Created
January 9, 2018 15:05
-
-
Save gnthibault/32f441c4993b741779282d704998dc60 to your computer and use it in GitHub Desktop.
A few commands related to docker
This file contains 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
#!/bin/bash | |
#Birth | |
mkdir dockerstuff | |
cd dockerstuff | |
echo "FROM ubuntu" Dockerfile | |
docker build -t testproj . | |
# Interactive run | |
#docker run -it ubuntu | |
# daemon run | |
docker run -d ubuntu | |
# list images | |
docker images | |
# list running containers | |
docker ps | |
#Death | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment