Skip to Content
0 likes
Pass Env Vars Without Hard-Coding Secrets Level: Intermediate

Pass variables from your shell, from an env file and from a Compose secret, and make Compose refuse to start when a required one is missing. After this, you can keep real values out of your files and your commands.

0 likes
Push to Docker Hub and Pull on Another Machine Level: Intermediate

Tag, push and pull an image in the order you type the commands, shown against a local registry, with the Docker Hub version written out. After this, you can move an image to another computer.

0 likes
Split Dev and Prod With Compose Override Files Level: Intermediate

Keep one base compose.yaml and merge a development override and a production file on top of it. After this, you can see what each environment gets with docker compose config before you run it.

0 likes
Stop Shipping node_modules in the Image Level: Intermediate

Keep node_modules out of the build context with a .dockerignore file and let npm ci install the packages inside the image. After this, you can cut the context size and avoid copying Windows-built packages into a Linux image.

0 likes
Tag an Image With a Version and latest Level: Intermediate

Tag one build with a version, latest and a commit name, then release the next version without moving the old tag. After this, you can roll back with one command.

0 likes
Wait for a Dependency With a Healthcheck Level: Intermediate

Add a pg_isready health check to a database and make the app wait for it with service_healthy. After this, you can stop an app from failing on a database that is still starting.