-
Notifications
You must be signed in to change notification settings - Fork 411
Docker Server.en
Hehe Tan edited this page Sep 23, 2016
·
3 revisions
We've provides a docker image on docker hub: webide. Pull it and create a container, then run with command:
./ide.sh docker run
If you make changes on source code, you can recompile and run with commands:
./ide.sh docker build
./ide.sh docker run
Listed below are all docker related command in ide.sh
./ide.sh docker build # create docker image
./ide.sh docker run # create and start a container
./ide.sh docker stop # stop container
./ide.sh docker attach # attach container(use control-c to exit)
./ide.sh docker logs # check container's logs
./ide.sh docker exec # create a new Bash session in the container
./ide.sh docker remove # remove container
If you encounter any problem using ide.sh
, try get around it using docker CLI directly.
If app state persistency is not important to you (that is, app data will be gone when container get deleted), simply run this one-liner:
docker run -p 8080:8080 --name webide webide/webide
Howerver, if you want to persist app state, you need to make sure $HOME/.coding-ide-home
directories exist. If not, you need to manually create them, then run:
docker create -p 8080:8080 -v $HOME/.coding-ide-home:/home/coding/.coding-ide-home --name webide webide/webide
Rebuild and run with:
docker build -t webide/webide
docker run -p 8080:8080 --name webide webide/webide
Listed below are other frequently used docker commands
# stop container
docker stop webide
# attach container
docker attach --sig-proxy=false webide
# check container's logs
docker logs webide
# create a new Bash session in the container
docker exec -it webide bash