Skip to content

Instantly share code, notes, and snippets.

@gangaaloori
Last active August 29, 2015 14:24
Show Gist options
  • Save gangaaloori/5b12191e86ee151a402d to your computer and use it in GitHub Desktop.
Save gangaaloori/5b12191e86ee151a402d to your computer and use it in GitHub Desktop.
List of basic Docker commands
# Add labels to images
LABEL com.example.version="0.0.1-beta" com.example.release-date="2015-02-12"
# View the labels
docker inspect 4fa6e0f0c678
# Query labels
# List all running containers that have a `com.example.is-beta` label
docker ps --filter "label=com.example.is-beta"
docker images --filter "label=vendor=acme"
# Stop & remove all the containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment