Kubernetes - Build and Deploy a Production-Ready Container Image
Combine multi-stage builds, build-time arguments, non-root users, and Pod security context into a single production-grade image pipeline.
Focused hands-on problems designed to help you hone your DevOps or Server Side skills. Some challenges are more educational, while others are based on real-world scenarios. The platform provides hints and feedback for each challenge, including automated solution checks.
Combine multi-stage builds, build-time arguments, non-root users, and Pod security context into a single production-grade image pipeline.
A poorly structured Docker image contains leftover build dependencies and leaked private registry credentials hiding in its intermediate layers. Squash the image to produce a clean, compact version with the same runtime filesystem.
Practice using Docker build arguments to inject version and commit metadata into a Go application during the image build.
Build a container image for a Node.js app that uses a private npm package without leaking the registry credentials into the image layers.
Write a Dockerfile for a simple CLI tool and learn how to use the ENTRYPOINT instruction to improve the user experience of containerized command-line applications.
Write a Dockerfile for a simple web service and learn how Docker images can improve the application startup UX by defining sensible runtime defaults using ENV, USER, and STOPSIGNAL instructions.
Practice optimizing applications' container images using multi-stage builds. Rewrite single-stage Dockerfiles for a Go backend and a TypeScript frontend to produce smaller, production-ready images without unnecessary build tools and dev dependencies.
Build a container image from a Dockerfile and use Docker commands to inspect its size and layer composition.
Practice building and compiling applications inside their Dockerfiles by containerizing a Go backend and a TypeScript frontend.
Learn how to keep your container images lean by excluding development dependencies (linters, test frameworks, etc.) from the production build.