Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A web UI to docker exec from the browser

NotificationsYou must be signed in to change notification settings

bitbull-team/docker-exec-web-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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-console

Then 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-console

With 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.

Build the image

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp