Skip to content

Instantly share code, notes, and snippets.

@gnthibault
Created January 9, 2018 15:05
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 gnthibault/32f441c4993b741779282d704998dc60 to your computer and use it in GitHub Desktop.
Save gnthibault/32f441c4993b741779282d704998dc60 to your computer and use it in GitHub Desktop.
A few commands related to docker
#!/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