├── images
├── kalilinux
│ ├── kali-rolling
│ └── kali
│ │ └── latest
├── library
│ ├── centos
│ │ ├── 7
│ │ ├── 8
│ │ └── latest
│ │ │ └── Dockerfile
│ ├── debian
│ │ ├── 9
│ │ ├── 10
│ │ ├── 11
│ │ ├── sid
│ │ └── latest
│ │ │ └── Dockerfile
│ ├── fedora
│ │ ├── 33
│ │ ├── 34
│ │ ├── 35
│ │ └── latest
│ ├── ubuntu
│ │ ├── 16.04
│ │ ├── 18.04
│ │ ├── 20.04
│ │ ├── devel
│ │ └── latest
│ ├── alpine
│ │ ├── base
│ │ │ ├── supervisor.conf
│ │ │ └── Dockerfile
│ │ └── latest
│ │ │ └── Dockerfile
│ └── archlinux
│ │ └── latest
│ │ └── Dockerfile
├── opensuse
│ ├── leap
│ └── tumbleweed
│ │ └── latest
│ │ └── Dockerfile
└── rockylinux
│ └── rockylinux
│ └── latest
├── assets
├── login.png
├── pull.png
├── pull2.png
├── images.png
├── overview.png
├── terminal.png
├── containers.png
├── newContainer.png
└── jetbrains-variant-4.svg
├── public
├── favicon.ico
├── img
│ └── hero-bg.jpg
├── css
│ ├── style.css
│ ├── xterm.css
│ ├── bootstrap-table.min.css
│ ├── bootstrap-select.min.css
│ └── bootstrap-select.css.map
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
└── js
│ ├── addons
│ ├── fullscreen
│ │ ├── fullscreen.css
│ │ ├── fullscreen.js.map
│ │ └── fullscreen.js
│ ├── winptyCompat
│ │ ├── winptyCompat.js
│ │ └── winptyCompat.js.map
│ ├── zmodem
│ │ ├── zmodem.js
│ │ └── zmodem.js.map
│ ├── webLinks
│ │ ├── webLinks.js.map
│ │ └── webLinks.js
│ ├── fit
│ │ ├── fit.js.map
│ │ └── fit.js
│ ├── terminado
│ │ ├── terminado.js
│ │ └── terminado.js.map
│ ├── attach
│ │ ├── attach.js
│ │ └── attach.js.map
│ └── search
│ │ ├── search.js
│ │ └── search.js.map
│ ├── app.js
│ ├── bootstrap3-typeahead.min.js
│ └── bootstrap-select.min.js
├── config.js
├── views
├── logs.html
├── terminal.html
├── error.html
├── login.html
├── include
│ ├── footer.html
│ └── header.html
├── overview.html
├── images.html
└── containers.html
├── Dockerfile
├── routes
├── index.js
├── overview.js
├── api.js
├── images.js
└── containers.js
├── middlewares
└── security.js
├── package.json
├── fabfile.py
├── bin
└── www
├── README.md
├── app.js
└── .gitignore
/images/kalilinux/kali-rolling:
--------------------------------------------------------------------------------
1 | kali
--------------------------------------------------------------------------------
/images/library/centos/7:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/centos/8:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/debian/10:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/debian/11:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/debian/9:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/debian/sid:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/fedora/33:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/fedora/34:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/fedora/35:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/ubuntu/16.04:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/ubuntu/18.04:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/ubuntu/20.04:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/library/ubuntu/devel:
--------------------------------------------------------------------------------
1 | latest
--------------------------------------------------------------------------------
/images/opensuse/leap:
--------------------------------------------------------------------------------
1 | tumbleweed
--------------------------------------------------------------------------------
/images/library/fedora/latest:
--------------------------------------------------------------------------------
1 | ../centos/latest
--------------------------------------------------------------------------------
/images/library/ubuntu/latest:
--------------------------------------------------------------------------------
1 | ../debian/latest
--------------------------------------------------------------------------------
/images/kalilinux/kali/latest:
--------------------------------------------------------------------------------
1 | ../../library/debian/latest/
--------------------------------------------------------------------------------
/images/rockylinux/rockylinux/latest:
--------------------------------------------------------------------------------
1 | ../../library/centos/latest/
--------------------------------------------------------------------------------
/images/library/alpine/base/supervisor.conf:
--------------------------------------------------------------------------------
1 | [program:sshd]
2 | command = /usr/sbin/sshd -D
--------------------------------------------------------------------------------
/assets/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/login.png
--------------------------------------------------------------------------------
/assets/pull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/pull.png
--------------------------------------------------------------------------------
/assets/pull2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/pull2.png
--------------------------------------------------------------------------------
/assets/images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/images.png
--------------------------------------------------------------------------------
/assets/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/overview.png
--------------------------------------------------------------------------------
/assets/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/terminal.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/assets/containers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/containers.png
--------------------------------------------------------------------------------
/assets/newContainer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/assets/newContainer.png
--------------------------------------------------------------------------------
/public/img/hero-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/img/hero-bg.jpg
--------------------------------------------------------------------------------
/public/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: #fff;
3 | color: #666666;
4 | font-family: "Open Sans", sans-serif;
5 | margin-top: 70px;
6 | }
--------------------------------------------------------------------------------
/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | 'username': process.env.EDW_USERNAME || 'admin',
3 | 'password': process.env.EDW_PASSWORD || 'admin'
4 | };
5 |
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyThink/EasyDockerWeb/HEAD/public/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/views/logs.html:
--------------------------------------------------------------------------------
1 | <% include include/header.html %>
2 |
5 | <% include include/footer.html %>
--------------------------------------------------------------------------------
/views/terminal.html:
--------------------------------------------------------------------------------
1 | <% include include/header.html %>
2 |
5 | <% include include/footer.html %>
--------------------------------------------------------------------------------
/public/js/addons/fullscreen/fullscreen.css:
--------------------------------------------------------------------------------
1 | .xterm.fullscreen {
2 | position: fixed;
3 | top: 0;
4 | bottom: 0;
5 | left: 0;
6 | right: 0;
7 | width: auto;
8 | height: auto;
9 | z-index: 255;
10 | }
11 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:9-alpine
2 | ADD . /src
3 |
4 | RUN apk update && apk add bash && \
5 | cd /src; yarn install && \
6 | # Time zone option, if you live in China pleace set it to Asia/Shanghai
7 | ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
8 |
9 | EXPOSE 3000
10 | CMD node /src/bin/www
11 |
--------------------------------------------------------------------------------
/routes/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 |
4 | /* GET home page. */
5 | router.get('/', (req, res, next) => {
6 | res.redirect('/overview');
7 | });
8 |
9 | router.get('/logout', (req, res, next) => {
10 | req.session.isLogin = false;
11 | res.locals.isLogin = false;
12 | res.redirect('/');
13 | });
14 |
15 | module.exports = router;
16 |
--------------------------------------------------------------------------------
/images/library/alpine/base/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine
2 |
3 | RUN wget https://github.com/ochinchina/supervisord/releases/download/v0.7.3/supervisord_0.7.3_Linux_64-bit.tar.gz &&\
4 | tar -xzf supervisord_0.7.3_Linux_64-bit.tar.gz &&ls &&\
5 | mv supervisord_0.7.3_Linux_64-bit/supervisord /usr/local/bin/supervisord &&\
6 | rm -rf supervisord_0.7.3_Linux_64-bit.tar.gz
7 |
8 | COPY images/library/alpine/base/supervisor.conf /etc/
9 |
10 |
--------------------------------------------------------------------------------
/views/error.html:
--------------------------------------------------------------------------------
1 | <% include include/header.html %>
2 |
3 |
4 |
5 |
6 |
<%= error.status %> <%= message %>
7 |
<%= error.stack %>
8 |
9 |
Return
10 |
11 |
12 |
13 | <% include include/footer.html %>
14 |
--------------------------------------------------------------------------------
/images/library/alpine/latest/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG image_tag
2 |
3 | FROM ghcr.io/bennythink/alpine:base as mybase
4 |
5 | FROM ${image_tag}
6 | RUN apk update && apk add dropbear
7 | RUN mkdir /etc/dropbear && echo 'root:root' |chpasswd
8 |
9 | RUN echo -e "[program:dropbear]\ncommand = /usr/sbin/dropbear -RFE" > /etc/supervisor.conf
10 | COPY --from=mybase /usr/local/bin/supervisord /usr/local/bin/supervisord
11 |
12 | ENTRYPOINT ["supervisord", "-c" ,"/etc/supervisor.conf"]
--------------------------------------------------------------------------------
/images/library/archlinux/latest/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG image_tag
2 |
3 | FROM ghcr.io/bennythink/alpine:base as mybase
4 |
5 | FROM ${image_tag}
6 | RUN pacman -Sy --noconfirm openssh && /usr/bin/ssh-keygen -A
7 | RUN echo 'root:root' |chpasswd && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
8 |
9 | COPY --from=mybase /etc/supervisor.conf /etc
10 | COPY --from=mybase /usr/local/bin/supervisord /usr/local/bin/supervisord
11 |
12 | ENTRYPOINT ["supervisord", "-c" ,"/etc/supervisor.conf"]
--------------------------------------------------------------------------------
/images/opensuse/tumbleweed/latest/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG image_tag
2 |
3 | FROM ghcr.io/bennythink/alpine:base as mybase
4 |
5 | FROM ${image_tag}
6 |
7 | RUN zypper install -y openssh-server && /usr/bin/ssh-keygen -A
8 | RUN echo 'root:root' |chpasswd && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
9 |
10 | COPY --from=mybase /etc/supervisor.conf /etc
11 | COPY --from=mybase /usr/local/bin/supervisord /usr/local/bin/supervisord
12 |
13 | ENTRYPOINT ["supervisord", "-c" ,"/etc/supervisor.conf"]
--------------------------------------------------------------------------------
/images/library/centos/latest/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG image_tag
2 |
3 | FROM ghcr.io/bennythink/alpine:base as mybase
4 |
5 | FROM ${image_tag}
6 | RUN yum install -y openssh-server && /usr/bin/ssh-keygen -A
7 | RUN echo 'root:root' |chpasswd && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
8 |
9 | COPY --from=mybase /etc/supervisor.conf /etc
10 | COPY --from=mybase /usr/local/bin/supervisord /usr/local/bin/supervisord
11 | COPY random /tmp/random
12 |
13 | ENTRYPOINT ["supervisord", "-c" ,"/etc/supervisor.conf"]
--------------------------------------------------------------------------------
/images/library/debian/latest/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG image_tag
2 |
3 | FROM ghcr.io/bennythink/alpine:base as mybase
4 |
5 | FROM ${image_tag}
6 | RUN apt update && apt install -y --no-install-recommends openssh-server && mkdir /run/sshd
7 | RUN echo 'root:root' |chpasswd && echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
8 |
9 | COPY --from=mybase /etc/supervisor.conf /etc
10 | COPY --from=mybase /usr/local/bin/supervisord /usr/local/bin/supervisord
11 | COPY random /tmp/random
12 |
13 | ENTRYPOINT ["supervisord", "-c" ,"/etc/supervisor.conf"]
14 |
--------------------------------------------------------------------------------
/middlewares/security.js:
--------------------------------------------------------------------------------
1 | const config = require('../config');
2 |
3 | const checkUser = (req, res, next) => {
4 | res.locals.isLogin = false;
5 | if (req.session.isLogin) {
6 | res.locals.isLogin = true;
7 | next();
8 | } else {
9 | const username = config.username,
10 | password = config.password;
11 | if (req.body.username === username && req.body.password === password) {
12 | req.session.isLogin = true;
13 | res.redirect('/');
14 | } else {
15 | res.render('login');
16 | }
17 | }
18 | };
19 |
20 | module.exports = {
21 | checkUser,
22 | };
23 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "easy-docker-web",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "start": "nodemon ./bin/www"
7 | },
8 | "nodemonConfig": {
9 | "verbose": true,
10 | "ext": "js,html,css"
11 | },
12 | "dependencies": {
13 | "babel-preset-react-app": "^9.1.1",
14 | "body-parser": "~1.18.2",
15 | "dockerode": "^2.5.4",
16 | "ejs": "^2.5.7",
17 | "express": "^4.16.4",
18 | "express-session": "^1.17.1",
19 | "express-status-monitor": "^1.2.8",
20 | "serve-favicon": "^2.4.5",
21 | "socket.io": "2.4.1"
22 | },
23 | "devDependencies": {
24 | "nodemon": "^2.0.4"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/routes/overview.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const router = express.Router();
3 | const Docker = require('dockerode');
4 | const docker = new Docker();
5 | /* GET home page. */
6 | const returnOverviewRouter = (io) => {
7 | router.get('/', (req, res, next) => {
8 | docker.info((err, info) => {
9 | // console.log(info)
10 | if (err) {
11 | res.render('error', {
12 | message: "Docker is running ?"
13 | });
14 | } else {
15 | res.render('overview', {
16 | info: info
17 | });
18 | }
19 | });
20 | });
21 |
22 | return router;
23 | };
24 |
25 | module.exports = returnOverviewRouter;
26 |
--------------------------------------------------------------------------------
/fabfile.py:
--------------------------------------------------------------------------------
1 | import glob
2 | import os
3 |
4 | from fabric.api import local
5 |
6 | registry = "ghcr.io/bennythink"
7 |
8 |
9 | # fabric3
10 | def base():
11 | local(f"docker build -f images/library/alpine/base/Dockerfile -t {registry}/alpine:base .")
12 | local(f"docker push {registry}/alpine:base ")
13 |
14 |
15 | def build():
16 | base()
17 | for fn in glob.iglob("images/**/Dockerfile", recursive=True):
18 | dirs: "list" = fn.split(os.sep)
19 | username = dirs[1]
20 | distro = dirs[2]
21 | tag = dirs[3]
22 | image_tag = f"{username}/{distro}:{tag}"
23 | with open("random", "w") as f:
24 | f.write(image_tag)
25 | local(f"docker build -f {fn} --build-arg image_tag={image_tag} -t {registry}/{distro}:{tag} .")
26 | local(f"docker push {registry}/{distro}:{tag}")
27 | os.remove("random")
28 |
29 |
30 | def prepare():
31 | for fn in glob.iglob("images/**/Dockerfile", recursive=True):
32 | dirs: "list" = fn.split(os.sep)
33 | distro = dirs[2]
34 | tag = dirs[3]
35 | local(f"docker pull {registry}/{distro}:{tag}")
36 |
--------------------------------------------------------------------------------
/views/login.html:
--------------------------------------------------------------------------------
1 | <% include include/header.html %>
2 |
3 |
4 |
Easy Docker Web Login page
5 |
6 |
25 |
26 | <% include include/footer.html %>
27 |
--------------------------------------------------------------------------------
/public/js/addons/fullscreen/fullscreen.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"fullscreen.js","sources":["../../../src/addons/fullscreen/fullscreen.ts","../../../node_modules/browser-pack/_prelude.js"],"sourcesContent":["/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n/// \n\nimport { Terminal } from 'xterm';\n\n/**\n * Toggle the given terminal's fullscreen mode.\n * @param term The terminal to toggle full screen mode\n * @param fullscreen Toggle fullscreen on (true) or off (false)\n */\nexport function toggleFullScreen(term: Terminal, fullscreen: boolean): void {\n let fn: string;\n\n if (typeof fullscreen === 'undefined') {\n fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';\n } else if (!fullscreen) {\n fn = 'remove';\n } else {\n fn = 'add';\n }\n\n term.element.classList[fn]('fullscreen');\n}\n\nexport function apply(terminalConstructor: typeof Terminal): void {\n (terminalConstructor.prototype).toggleFullScreen = function (fullscreen: boolean): void {\n toggleFullScreen(this, fullscreen);\n };\n}\n",null],"names":[],"mappings":"ACAA;;;ADcA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAZA;AAcA;AACA;AACA;AACA;AACA;AAJA;;;"}
--------------------------------------------------------------------------------
/public/js/addons/fullscreen/fullscreen.js:
--------------------------------------------------------------------------------
1 | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.fullscreen = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o
2 |
3 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
43 |