Docker and Deployment: From Your Machine to Production

Docker and Deployment is an advanced-level course of 5 lessons (about 3 h 59 min), with 16 exercises and 15 quiz questions. Prerequisites: Terminal and Command Line, HTTP and REST APIs. The course needs a full project environment, planned for a later phase of the platform.

  • Back-end
  • Advanced
  • 5 lessons
  • 3 h 59 min
  • 16 exercises
  • Full project environment (phase 2)

The course in brief

This course takes you from "it works on my machine" to an application deployed reliably. You will learn to work with containers and images, write optimized and secure Dockerfiles, orchestrate an API and its database with Docker Compose, then publish and deploy your images with a CI/CD pipeline and an HTTPS reverse proxy. The examples cover web APIs as well as data science services.

What you will be able to do

  • Run, inspect, and manage containers, ports, and volumes with the Docker CLI
  • Write an efficient Dockerfile by taking advantage of layer caching
  • Produce lightweight, secure images: multi-stage builds, non-root user, no secrets, healthcheck
  • Describe and operate a multi-service application with Docker Compose
  • Publish versioned images and automate their deployment with CI/CD
  • Put an application into production behind an HTTPS reverse proxy with rollback

Syllabus: 5 lessons

    • Explain the difference between an image, a container, and a virtual machine
    • Run, inspect, and stop a container with the Docker CLI
    • Publish a port and mount a volume

    ContainersImagesDocker CLI

  1. 02

    Writing a Dockerfile for Your Application

    18 min
    • Write a Dockerfile for a Node.js or Python application
    • Take advantage of layer caching by ordering instructions correctly
    • Build, tag, and run your own image

    DockerfileLayers and cacheImage build

  2. 03

    Optimizing and Securing Your Images

    18 min
    • Reduce an image's size with a multi-stage build
    • Apply security best practices: non-root user, pinned versions, no secrets
    • Add a healthcheck and scan an image for vulnerabilities

    Multi-stage buildImage securityHealthcheck

  3. 04

    Docker Compose: Orchestrating a Multi-Service Application

    18 min
    • Describe an application (API + database) in a compose.yaml file
    • Manage network, volumes, environment variables, and startup order
    • Use docker compose commands day to day

    Docker ComposeDocker networksVolumes

  4. 05

    Deploying to Production: Registry, CI/CD, and HTTPS

    20 min
    • Publish a versioned image to a registry
    • Automate build and deployment with a CI/CD pipeline
    • Go to production behind an HTTPS reverse proxy with environment-based configuration, logs, and rollback

    Image registryCI/CDReverse proxy and HTTPSTwelve-factor app

Final project

Containerize and Deploy a Complete Application

Take an existing application from the path (Express API + PostgreSQL, or a FastAPI prediction API) and make it deployable end to end: a secure multi-stage Dockerfile, a compose.yaml for development, a CI pipeline that tests then publishes the image, and an HTTPS deployment on a server or a container platform, with a documented rollback procedure.

Deliverables

  • A multi-stage Dockerfile, a .dockerignore, and proof that the image runs as a non-root user
  • A compose.yaml (and compose.override.yaml) that starts the application and its database with one command
  • A CI/CD workflow that tests, builds, tags, and publishes the image
  • The HTTPS URL of the deployed application and a deployment README (environment variables, commands, rollback)

Assessment criteria

  • The application starts locally with `docker compose up` with no other installation
  • The final image is lightweight, pinned, secret-free, and has a healthcheck
  • The pipeline blocks publication if the tests fail
  • The deployment is accessible over HTTPS and the database is not publicly exposed
  • Rolling back to the previous version is documented and demonstrated

Frequently asked questions

Do I need to know how to administer Linux to learn Docker?

You need to be comfortable with the command line (course F2). The course explains the useful system concepts, such as ports, volumes, and users, at the moment they are needed.

What is the difference between Docker and a virtual machine?

A virtual machine includes a complete operating system. A container shares the host machine's kernel: it is much lighter and starts in a fraction of a second.

Is this course useful for a data scientist?

Yes. The examples include Jupyter, Python prediction APIs, and deployment on a managed container platform, to make your models reproducible and usable.

Is Docker Compose enough for production?

For an application on a single server, Compose with an HTTPS reverse proxy is a simple and robust solution. For many services or heavy scaling, you move to a managed platform or Kubernetes.

This course, told for your job

Say what you want to be able to do: “Docker and Deployment” takes its place in your path, with examples from your field. The concepts stay those of the course.

The preview is free, and you can take the courses one at a time without paying. The path only contains lessons from the catalogue.