- Notifications
You must be signed in to change notification settings - Fork42
bitbull-team/docker-exec-web-console
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This image is originally inspiratedbythis gist.
The container usesocat to bound Docker socket to a TCP port, so that I could avoid to changethehttp.Post part in the Go server to talk directly to a UNIX socket.
You can launch the container in this way:
docker run \--name docker-exec-web-console \-p 9999:8888 \-v /var/run/docker.sock:/var/run/docker.sock \bitbull/docker-exec-web-consoleThen you can reach the console at the urlhttp://localhost:9999
It's possible to pass a context path to which the container will responds, usingCONTEXT_PATHenvironment variable:
docker run \--name docker-exec-web-console \-p 9999:8888 \-e "CONTEXT_PATH=/webconsole" \-v /var/run/docker.sock:/var/run/docker.sock \bitbull/docker-exec-web-consoleWith the above example, the console will be reachable at the urlhttp://localhost:9999/webconsole
You can select the container to exec into passing its id directly viacid querystring parameter (eg.http://localhost:9999?cid=<container id> ) or in the prompt that will show at page load.
You can pass the command to execute passing it viacmd querystring parameter (eg.http://localhost:9999?cid=<container id>&cmd=/bin/sh ), otherwise it default to/bin/bash.
The image is based onalpine:latest, so you need to compile the server for Linux with all libsstatically linked:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .then you can build as usual:
docker build -t bitbull/docker-exec-web-console .About
A web UI to docker exec from the browser
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.