EasyEnv
Docker
Intermediate

Docker

Learn Docker from first container to production. Images, networking, volumes, Compose, multi-stage builds, and secure registries.

13 lessons6.6h hands-on11 languages
Start learning freeDocker course

13 lessons, in order

  1. 1

    What Is Docker

    You build something on your own computer, and it works. You send it to a teammate, or put it on a server, and it breaks. A different operating...

    Containers vs VMsImagesContainersDocker daemonDocker CLI
    20 min
  2. 2

    Your First Container

    You now know, in theory, that an image is a sealed package and a container is what happens when you actually open one. Theory only gets you so far....

    Docker runHello-worldInteractive shellDocker psDocker stopDocker rm
    25 min
  3. 3

    Images and the Dockerfile

    So far you have only opened bags that someone else sealed: hello-world, ubuntu, alpine. That is fine for exploring, but it does not solve the problem...

    FROMRUNCMDDocker buildDocker imagesDocker rmi
    30 min
  4. 4

    Building Custom Images

    The Dockerfile from the last lesson only ever installed software, it never brought any of your own files into the image, and it never controlled...

    COPYWORKDIRENVEXPOSELayer caching.dockerignore
    35 min
  5. 5

    Container Networking

    You have run a web server in a container, watched it report that it is listening on port 80, and then opened http://localhost:80 in a browser and got...

    Published ports-p host:containerUser-defined networksContainer DNSDocker network
    30 min
  6. 6

    Volumes and Persistence

    Run a database in a container, add some rows, remove the container, start it again, and the rows are gone. Not corrupted, not hidden: gone, as though...

    Bind mountsNamed volumesContainer writable layerDocker volumeWhere data lives
    30 min
  7. 7

    Docker Compose

    By now, starting a realistic application takes four commands and none of them are short. Create a network. Create a volume. Start the database with...

    Compose.yamlServicesDepends_onPort mappingDocker compose up/downNamed volumes in compose
    35 min
  8. 8

    Multi-Stage Builds

    Build a container image for a compiled program the obvious way and you get something startling: a 900 megabyte image whose useful contents are one 8...

    Build stageRuntime stage--from=builderSlim final imagesAS aliasing
    35 min
  9. 9

    Environment Variables and Secrets

    Your image works on your laptop. Now it needs to run in staging with a different database, and in production with a different one again, and the...

    ENV in Dockerfile-e at runEnv_file in composeWhy not to bake secretsDocker secrets brief mention
    25 min
  10. 10

    Healthchecks and Restart Policies

    Your stack is up. docker ps says everything is running, and the site returns errors. You dig in and find the API started before the database was...

    HEALTHCHECK directive--restart=unless-stoppedDocker inspect healthCompose healthcheck
    25 min
  11. 11

    Image Optimization and Security

    Almost no production incident involving Docker is a Docker bug. The recurring pattern is much duller: an image built from node:latest two years ago,...

    Small bases like alpine and distrolessUSER non-rootPinning versionsDocker scoutTrivyMulti-arch idea
    30 min
  12. 12

    Registries and Publishing

    Every image you have built so far exists in exactly one place: the Docker daemon on your machine. That is fine while you are the only one running it,...

    Docker tagDocker loginDocker pushDocker HubGHCRPrivate registries
    25 min
  13. 13

    Capstone: Shipping a Stack

    Every lesson so far taught one thing against a container that printed a string. That is how you learn a directive and it hides the part that is...

    Multi-stage DockerfileCompose.yaml with two servicesHealthcheck and restart policyTag and pushRun elsewhere
    50 min
Docker Course: Hands-on, in 11 Languages | Engineering Courses