Skip to content

Instantly share code, notes, and snippets.

@JamWils
Last active January 28, 2018 01:10
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 JamWils/db3f06fbf0b50251ec99e5b8fb30005a to your computer and use it in GitHub Desktop.
Save JamWils/db3f06fbf0b50251ec99e5b8fb30005a to your computer and use it in GitHub Desktop.
# Delete all exited containers
docker rm $(docker ps -q -f status=exited)
# Delete all images with no tags
docker rmi $(docker images -q -f "dangling=true")
# Plugins -> Network
docker info
# Create a new network
docker network create -d bridge --subnet 10.0.0.1/24 <network_name>
# Inspect a netork
docket network inspect <network_name>
# Place an alpine container running on the network we created
docker run -dt --name <instance_name> --network <network_name> alpine sleep 1d
# Jump into the specific container the -i makes STDIN stay open and -t allocates a pseudo terminal
docker exec -it <instance_name> sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment