-
"When you commit a container to an image, it will remember the last run parameters you used by default"
-
Dockerfile: "Each RUN instruction produces a new layer."
- Last docker container:
sudo docker ps -lq
- List of docker container ids:
sudo docker ps -qa
sudo docker rm $(sudo docker ps -a | grep -vE 'deoren|ID' | awk '{print $1}')
Last docker container:
sudo docker ps -lq
List of docker container ids:
sudo docker ps -qa
Prune all containers (but not images):
sudo docker ps -aq | xargs sudo docker rm
What changed between the image and the last container that was run?
sudo docker diff $(sudo docker -lq)
Saving changes made to a container as a new image (layer):
sudo docker commit $(sudo docker ps -lq) DOCKER_PROFILE/DOCKER_REPO:TAG
Remove image:
sudo docker rmi IMAGE
sudo docker image rm IMAGE
As of the time this Gist entry was created, GitHub does not support notifications for comments for mentions to Gist entries (see isaacs/github#21 for details). Please contact me via Twitter or file an issue in the deoren/leave-feedback repo (created for that very purpose) if you wish to receive a response for your feedback. Thank you in advance!