Skip to content

enterprisecoding-ltd/container-web-terminal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Container Web Terminal

Docker Repository on Quay

This project is forked from bitbull-team's docker-exec-web-console repo which is originally inspirated by this gist.

You can launch the container in this way:

docker run \
	--name container-web-terminal \
	-p 9999:8888 \
	-v /var/run/docker.sock:/var/run/docker.sock \
	quay.io/enterprisecoding/container-web-terminal

Then you can reach the terminal at the url http://localhost:9999

It's possible to pass a context path to which the container will responds, using CONTEXT_PATH environment variable:

docker run \
	--name container-web-terminal \
	-p 9999:8888 \
	-e "CONTEXT_PATH=/webterminal" \
	-v /var/run/docker.sock:/var/run/docker.sock \
	quay.io/enterprisecoding/container-web-terminal

With the above example, the terminal will be reachable at the url http://localhost:9999/webterminal

You can select the container to exec into passing its id directly via cid 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 via cmd querystring parameter ( eg. http://localhost:9999?cid=<container id>&cmd=/bin/sh ), otherwise it default to /bin/bash.

Build the image

The image is designed to have a multi-stage docker file. Base container ise build on alpine:latest and compiler part uses golang:1.15.4-alpine. All you have to do is build container image using following command;

docker build -t quay.io/enterprisecoding/container-web-terminal .

About

A web UI to docker exec from the browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Go 56.5%
  • JavaScript 21.0%
  • Dockerfile 13.7%
  • HTML 7.4%
  • Shell 1.4%