Here is a list of some docker snippets that I use daily.

Create a tagged image from Dockerfile

docker build -t tag_name /path/to/  

Run a docker image in detached mode

docker run -p local_port:remote_port -d tag_name  

Remove stopped containers

docker rm $(docker ps -a -q)  

Remove untagged images

docker rmi $(docker images | grep "^<none>" | awk "{print $3}")  

Stop and remove all containers

docker stop $(sudo docker ps -a -q) && sudo docker rm $(sudo docker ps -a -q)  

Show Docker containers memory consumption

sudo docker stop $(sudo docker ps -a -q) && sudo docker rm $(sudo docker ps -a -q) && sudo docker rmi $(sudo docker images -a -q)  
—Read This Next—

Update ssh to version 7.5p1

Follow the instructions to update ssh on the latest version. The process requires patching the current source, which is unfortunately not w
—You Might Enjoy—

Sleep-sort in javascript

Sleep sort is a joke sorting algorithm. Sleep sort spawns off one process for each argument. Each process waits for n milliseconds, then pr