Skip to content

Instantly share code, notes, and snippets.

@isnifer
Last active April 1, 2018 14:30
Show Gist options
  • Save isnifer/dea1abb6b150c360bc3d to your computer and use it in GitHub Desktop.
Save isnifer/dea1abb6b150c360bc3d to your computer and use it in GitHub Desktop.
Docker useful commands
# 1. Remove all old containers by id
# -q prints just the container ids (without column headers)
# -f allows you to filter your list of printed containers (in this case we are filtering to only show exited containers)
docker rm $(docker ps -q -f status=exited)
# 2. Change DNS settings, it will help you when your ISP
# proxy all DNS requests to their local DNS-server
sudo nano /etc/default/docker
# Then change line to whatever you want
DOCKER_OPTS="--dns 8.8.8.8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment