Skip to Content
Skip to content
Tutorials

DevOps Tutorials

Focused DevOps tutorials for diagnosing container, build, and deployment problems without digging through scattered forum threads. Each guide isolates one operational task—such as shrinking an image, verifying a health check, scanning an SBOM with Grype, or reloading Compose services without dropping requests.

Run the minimal Compose or Dockerfile example locally, compare the exact CLI output, and apply the fix to your own stack.

Docker
Fix "permission denied" on a Bind Mount Level: Intermediate

Reproduce the error with a non-root container, read the owner numbers and fix it by changing the folder's owner or the container's user.

Docker
Named Volume vs Bind Mount for a Database Level: Intermediate

Run PostgreSQL 18 on a named volume and on a bind mount and compare what each leaves on your disk.

Docker
Override ENTRYPOINT for a One-Off Job Level: Intermediate

Run a different program from the same image with --entrypoint, in docker run and in Compose. After this, you can start a shell or a one-time job without rebuilding the image.

Docker
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.

Docker
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.

Docker
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.

Docker
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.

Docker
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.

Docker
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.

Docker
Cut Rebuild Time With a BuildKit Cache Mount Level: Advanced

Add a BuildKit cache mount to pip install so a changed requirements file downloads only the new packages.

Docker
Multi-Stage Node or Go Image Under 50 MB Level: Advanced

Build a Go service in a multi-stage Dockerfile and ship it in an image well under 50 MB, with a non-root user and a health check.

Docker
Run the Container as a Non-Root User Level: Advanced

Add a user to an image, give it only the folder it writes to, and fix the two permission errors you will most likely hit. After this, your containers stop running as root.