Repair a Fragile Dockerfile

A Dockerfile that builds cleanly and is wrong five ways. Find them from the built image, not from reading, and fix them without changing what the app does.

Project labintermediate~35 minFree

What you'll do

  • ✓Pin a base image and use an absolute working directory
  • ✓Keep credentials and test data out of the build context
  • ✓Give the container a main process that receives signals
  • ✓Run the application as a non-root user

Lab outline

  1. 01The image
  2. 02The runtime

Before you start

  • Containerize the Status API

Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.

← All Docker labs

Your first machine is
8 seconds away.

Learn by doing on real machines — and give every AI agent one of its own.

Free forever · No credit card · Cancel anytime

Repair a Fragile Dockerfile — Docker lab | Kube Labs