Docker Compose Cheat Sheet
Posted : admin On 1/29/2022Docker-compose up is used to start a project. It tries to automate a series of operations including building a mirror, (re)creating a service, starting a service, and associating a service-related container. Sometimes you will need docker-compose up -rebuild after making code changes. Docker-compose down. This stops all containers gracefully, and once all are stopped, it removes them. Any networks created by up are also removed. Use -v to remove volumes. To list containers: docker-compose ps. You can list the names of the services instead with the -services option. Use -a to include stopped containers. To build images: docker-compose build.
- Docker Compose Syntax
- Docker Commands List
- Docker Cheat Sheet Pdf
- Docker Compose Cheatsheet Pdf
- Docker Command Line Cheat Sheet

docker daemon
Enable buildkit
Add to /etc/docker/daemon.json
:
docker-compose
Devices
Labels
External Network
Dockerfile
Docker Stop Signal
imagemagick
vim
path update
download & extract tar.gz
gpg dirmgr explained
purge
list what exposed ports do
cassandra
gosu
Docker Compose Syntax
debian
copy with proper permissions
su-exec
setgid
npm
Docker Commands List
gosu
tini
node
redis

docker
google cloud sdk
kubectl
pip
locale
tomcat
https://github.com/Unidata/tomcat-docker/blob/master/Dockerfile
gosu tomcat
Secure repository setup
create application folder structure
Download and clean up in one layer
Package Manager tricks
Metadata
Make sure to add ARG
statements as late as possible to not invalidate the layer cache needlessly.Each ARG
will be prepended to all subsequent RUN
statements, i.e. building an image with the following Dockerfile docker --pull --tag foo:latest --build-arg GIT_COMMIT=46e24af6 --build-arg USERNAME=flask .
Effectively results in the following calls:
Docker Cheat Sheet Pdf
Since the git commit hash will typically change with each build the build will not make good use of Docker’s layer cache