Docker & Containers
Package applications so they run identically everywhere: images, Dockerfiles, volumes, networks, Compose and production concerns.
Prerequisites
- Comfort with a command line
- An application you can build, in any language
Technologies
About this course
A container bundles your application with its dependencies so it behaves the same on your machine as on a server. That single property removes a whole category of environment problems.
This course starts with what a container actually is, compared honestly against a virtual machine, because the difference explains why containers start in under a second.
You will containerise both a .NET API and a front-end application, then use Compose to run them together with a database. The final module covers the things that separate a working image from one you would deploy: multi-stage builds, non-root users, layer caching and health checks.
Course roadmap
All 16 lessons are written and available.
- 01Writing a DockerfileDescribe how to build an image, instruction by instruction.20 min
- 02Building ImagesBuild and tag images, and read the build output.16 min
- 03Layers and Build CachingOrder instructions so rebuilds stay fast.18 min
- 04Multi-Stage BuildsBuild in one stage and ship a minimal runtime image from another.16 min
- 01Running ContainersStart, stop, inspect and remove containers.16 min
- 02PortsMap container ports to the host and diagnose when it does not work.16 min
- 03Volumes and PersistenceKeep data alive beyond the container that wrote it.16 min
- 04NetworksLet containers reach each other by name.16 min
- 05Environment VariablesConfigure a container at run time instead of baking settings into the image.16 min
- 01Docker ComposeDefine and run a multi-service setup from one file.20 min
- 02Containerising a .NET ApplicationBuild an efficient production image for an ASP.NET Core app.22 min
- 03Container SecurityRun as a non-root user and reduce what the image contains.20 min
- 04Production ConsiderationsAdd health checks, resource limits and sensible logging.20 min
On completion
What you should take away
- Containers share the host kernel, which is why they are fast and small compared to virtual machines
- An image is built in layers, and layer order determines your build speed
- Configuration belongs in environment variables, not in the image
- A production image runs as a non-root user and reports its own health
Recommended next course
Cloud & DevOps Foundations
Cloud concepts that transfer between providers, plus the automated pipeline that gets your code from commit to running system.
Continue to Cloud & DevOpsHave a project worth talking through?
Tell us what you're building or what's slowing your current system down. We'll give you a direct read on scope and approach.