-
Notifications
You must be signed in to change notification settings - Fork 2
Wrap up
Mark Fernandes edited this page Sep 9, 2016
·
6 revisions
'docker ps' shows containers running on your host
'docker stop [ID]' stops the execution of the container with the stated id.
'docker rm [ID]' removes the container matching id (can be a list of ids)
'docker rmi [ID]' removes pulled image id (only do this is space is a concern)
'docker stats ' (i.e. ‘top’ for docker containers)
cid = $(docker run....)
docker kill $cid
docker rm $cid
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
- Use && to combine command - this reduces the number of layers and can result in smaller images (downside file is not so readable
- Use \ to continue long lines (just like Linux) which can improve readability when you have large lists of pre requisite packages
- If you look at my Dockerfiles you will notice I prefix all apt-get installs with an apt-get to ensure ALL the packages get updated (this can be a downside of the layers) and I try and clear up temp & cache files to reduce the size of a layer which translates into a smaller container.
- Spend some time examining other people's Dockerfiles on the Docker Hub and you will learn lots of tricks (even broken ones have value here).
Please leave constructive feedback here.
Thank you.
Introduction to Docker and Software deployment
- Course Introduction: (Exercise using the Etherpad) - What are the barriers to users finding and using your software? Don't click HERE until asked to - no peeking! :-)
- Installing software (Exercise using the Etherpad) - What are the different ways we install software under linux?) Do not click HERE until asked to - no peeking! :-)