Skip to content

Instantly share code, notes, and snippets.

@xilikas
Last active June 20, 2018 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xilikas/6141069fa58b9bf1062dd28df6cdaee7 to your computer and use it in GitHub Desktop.
Save xilikas/6141069fa58b9bf1062dd28df6cdaee7 to your computer and use it in GitHub Desktop.
docker build . --tag <name>: create image of Dockerfile in current directory with a name
docker ps : List all running containers
docker run -it <container> /bin/bash : Run interactive terminal (e.g. bash) on container
docker logs <container> : Logs of specified container
docker rm <container> : removes one or more containers
docker rm $(docker ps -aq) : removes all stopped containers
docker stop <container> : stops specified container
docker rmi <image> : removes image
docker rmi $(docker images -q) : removes all images
docker-compose build up -d : Rebuilds Dockerfile specified in docker-compose, starts stack and daemonizes it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment