Skip to content

Instantly share code, notes, and snippets.

Last active Jan 28, 2018
What would you like to do?
# 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 <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