Last active
January 28, 2018 01:10
-
-
Save JamWils/db3f06fbf0b50251ec99e5b8fb30005a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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