Skip to content

Instantly share code, notes, and snippets.

@smalot
Last active October 10, 2015 17:06
Show Gist options
  • Save smalot/74e240019004947cb35c to your computer and use it in GitHub Desktop.
Save smalot/74e240019004947cb35c to your computer and use it in GitHub Desktop.
Tips for Docker

Stop all containers

docker stop $(docker ps -a -q)

Remove all containers

docker rm $(docker ps -a -q)

Remove all images

docker rmi $(docker images -q)

Build using Compose

docker-compose build --no-cache

Run using Compose

docker-compose up --force-recreate

Run shell using Compose

docker-compose run <container_name> bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment