Module 3 · Project 03 · Dockerize a Real Application · Lesson 14 of 48

Build it: tag, push and document your container

Tag images properly, push them to a registry, build the project in stages and test yourself.

In this lesson · about 35 minutes

  • Tag images with versions and commit IDs and push them to a registry
  • Build Project 03 from a simple image to a lean Compose stack
  • Answer the classic Docker interview questions

Registries and tags

A registry stores images so servers and pipelines can pull them: Docker Hub, GitHub Container Registry, or Amazon ECR on AWS. An image's full name includes the registry and a tag:

docker tag notes-app:1.0 ghcr.io/yourname/notes-app:1.0.0
docker tag notes-app:1.0 ghcr.io/yourname/notes-app:3f9c2e1   # the git commit
docker login ghcr.io
docker push ghcr.io/yourname/notes-app:1.0.0
docker push ghcr.io/yourname/notes-app:3f9c2e1

Tag with a version (people read it) and the commit ID (you can trace exactly which code is running). Avoid deploying latest: it silently points at whatever was pushed last.

Build it in stages

  1. Containerize: pick a small app in any language. Write a Dockerfile and .dockerignore; build, run and curl it.
  2. Make it lean: slim base, multi-stage, non-root user, pinned versions, HEALTHCHECK. Record image size before and after (docker image ls).
  3. Compose it: add a database with a named volume, a health check and settings from .env.
  4. Ship it: tag with a version and commit ID and push to a registry.

Break it on purpose

  • Remove the volume line, save data, run down and up. Where did the data go?
  • Start the API before the database is ready (remove the health condition). What error do you see?
  • Run docker run --rm -it notes-app whoami before and after adding USER.

In your README, put the image size table (before and after), the Compose diagram, and what broke.

Guided dialogue

Mock interview: Docker

0 of 5 answered

I

Five questions that come up in almost every DevOps interview.

I

What's the difference between an image and a container?

Flashcards

Project 03 flashcards

0 of 8 known

Say the answer out loud, flip the card, then be honest: cards you miss come back at the end.

8 left in the deck

Practice exam

Project 03 practice test

Ten questions, 12 minutes.

  • 10 questions · 12 minutes
  • No feedback until you submit. Flag questions to come back to them.
  • Aim for 85% or better before you move on. The real exam's 750 out of 900 is roughly 80–83%.

Write the 'Implementation' and 'Security' sections for your Docker project.

Consider these questions and write down your thoughts. What you write stays on this device.

Written by Noviq Academy in its own words. The labs are simulations: no real servers are touched. When you build the projects yourself, use a practice virtual machine or a free-tier cloud account you control, watch your cloud spending, and never run cleanup or delete commands on a machine you care about. Tool names belong to their owners; versions and output are shown for learning and may differ slightly from yours. Read-aloud and the whiteboard voice use your device's built-in voices.