general notes on how to use docker
- docker pull ubuntu
- docker run -it ubuntu bash
- docker run -itd ubuntu bash
- docker ps
- docker ps -a
- docker inspect silly_mcnulty
- docker attach silly_mcnulty
- docker stop silly_mcnulty
- docker restart silly_mcnulty
Create an image with preconfigured settings from an already created instance (i.e. - you installed apache2 and want to always launch a container with it already running)
- docker commit -m 'apache2 installed and running' -a lucassha silly_mcnulty ubunapache:v1
-m for the message. -a for the username. last portion is the name of the new image.
- docker run -dp 2345:80 nginx