/docker

Primary LanguagePython

docker

python

Simple hello world python app taken from https://docs.docker.com/get-started/

commands

docker build --tag=pythonapp .

docker run -p 4000:80 pythonapp

docker run -d -p 4000:80 pythonapp (run in background)

docker container stop deb52db86e95 # Use container id

docker container ls # List all running containers

docker container ls -a # List all containers, even those not running

docker container stop # Gracefully stop the specified container

docker container kill # Force shutdown of the specified container

docker container rm # Remove specified container from this machine

docker container rm $(docker container ls -a -q) # Remove all containers

docker image ls -a # List all images on this machine

docker image rm # Remove specified image from this machine

docker image rm $(docker image ls -a -q) # Remove all images from this machine

docker login # Log in this CLI session using your Docker credentials

docker tag username/repository:tag # Tag for upload to registry

docker push username/repository:tag # Upload tagged image to registry

docker run username/repository:tag # Run image from a registry