Install Docker
The homebrew
version ofdocker-compose
requires virtualbox
, which is not available for Apple Silicon chips (as of 06/2022). For newer Apple computers, install the Docker Desktop.
Usage (cheatsheet)
Remove Containers and Images
docker system prune
will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
docker system prune
docker system prune -a --filter "until = 24h"
Removing all stopped containers
docker container prune
Remove a container upon exit
docker run —rm __image_name__
Stop and remove all containers
docker stop $ (docker ps -a -q)
docker rm $ (docker ps -a -q)
Removing dangling images
docker image prune
Remove all images ☢️
docker rmi $ (docker images -a -q)
Useful Docker Tools
Convert videos to gifs
Pull the docker image from here.
sudo docker run --rm -v=`pwd`:/tmp/ffmpeg kafebob/video2gif video.mp4 video.gif