Docker Training Topic-Wise Online Mock Tests & Free MCQ Practice
Select any course and syllabus topic below to launch a timed 50-MCQ engineering exam (up to 2 free attempts per topic daily) with instant code-level explanations.
Timed code-output & architecture MCQs with instant scorecard. Want spoken viva practice too?
Select Any IT Course (34 Courses • 100% Topics Covered)
Docker Training — Topic-Wise Mock Tests
Expand any module below to start a live timed MCQ exam across 244 Mock Test sets (max 2 free attempts per topic per day).
All Modules & Topics in Docker Training
Docker Fundamentals — Containers vs Virtual Machines, Shared Host Kernel & OCI Standards
Purpose: To understand and apply Docker Fundamentals — Containers vs Virtual Machines, Shared Host Kernel & OCI Standards in real Docker systems — specifically: Why VMs duplicate full guest kernels and gigabytes of OS RAM per instance while Docker containers run as isolated user-space Linux processes sharing the host kernel, governed by Open Container Initiative (`OCI` image-spec & runtime-spec) standards, so your code stays reliable, fast, and easy to maintain in production.
Docker Core Features — Linux Namespaces, `cgroups v2`, Seccomp/Capabilities & Layer Deduplication
Purpose: To understand and apply Docker Core Features — Linux Namespaces, `cgroups v2`, Seccomp/Capabilities & Layer Deduplication in real Docker systems — specifically: How Docker achieves isolation + security + speed: Namespaces isolate **visibility** (`pid`, `net`, `mnt`, `uts`, `ipc`, `user`), `cgroups v2` meter **hardware consumption** (CPU, RAM, Block I/O, PIDs), Linux Capabilities + `seccomp` filter ~44 risky syscalls by default, and read-only layers deduplicate disk/network pulls, so your code stays reliable, fast, and easy to maintain in production.
Docker Architecture — Client REST API, `dockerd`, `containerd`, `containerd-shim` & `runc`
Purpose: To understand and apply Docker Architecture — Client REST API, `dockerd`, `containerd`, `containerd-shim` & `runc` in real Docker systems — specifically: Why modern Docker split the monolithic daemon into modular layers: `docker` CLI speaks HTTP over `/var/run/docker.sock` to `dockerd`, which delegates lifecycle over gRPC to `containerd`; `containerd` spawns a per-container `containerd-shim` that invokes OCI `runc` to create kernel namespaces and then exits — leaving the shim as lightweight parent!, so your code stays reliable, fast, and easy to maintain in production.
Installing Docker Engine on Linux — GPG Apt Repos, Rootless Mode & `docker` Group Security
Purpose: To understand and apply Installing Docker Engine on Linux — GPG Apt Repos, Rootless Mode & `docker` Group Security in real Docker systems — specifically: Removing conflicting legacy distro packages, adding Docker’s official `/etc/apt/keyrings/docker.asc` GPG repository (`docker-ce`, `docker-ce-cli`, `containerd.io`, `docker-buildx-plugin`, `docker-compose-plugin`), understanding `usermod -aG docker` root-equivalence, and running Rootless Docker via `user_namespaces`, so your code stays reliable, fast, and easy to maintain in production.
Docker on Windows 10/11 — WSL 2 Lightweight Linux Kernel, `.wslconfig` & Avoiding `/mnt/c` I/O Traps
Purpose: To understand and apply Docker on Windows 10/11 — WSL 2 Lightweight Linux Kernel, `.wslconfig` & Avoiding `/mnt/c` I/O Traps in real Docker systems — specifically: How Docker Desktop on Windows runs a real Microsoft-maintained Linux kernel inside a lightweight WSL 2 utility VM, why bind-mounting C:\ (`/mnt/c/`) crosses a slow 9P protocol bridge (`10x–20x` slower `npm install` / Composer / Maven I/O!), and capping `vmmem` via `.wslconfig`, so your code stays reliable, fast, and easy to maintain in production.
Docker Images vs Containers — Read-Only Content-Addressable Layers vs Thin Writable R/W Layer
Purpose: To understand and apply Docker Images vs Containers — Read-Only Content-Addressable Layers vs Thin Writable R/W Layer in real Docker systems — specifically: Class vs Object analogy at the OS level: an **Image** is an immutable stack of read-only filesystem diff layers + JSON config (entrypoint, env, user), while a **Container** mounts a thin ephemeral Read-Write Copy-on-Write (`upperdir`) layer on top of those shared read-only layers (`lowerdir`), so your code stays reliable, fast, and easy to maintain in production.
Mastering `docker run` — Lifecycle (`create` + `start`), `127.0.0.1` Port Binding, `--init` & Resource Caps
Purpose: To understand and apply Mastering `docker run` — Lifecycle (`create` + `start`), `127.0.0.1` Port Binding, `--init` & Resource Caps in real Docker systems — specifically: What `docker run` orchestrates under the hood (pull -> create -> network netns/veth -> mount volumes -> start PID 1), `-d` detached vs `-it` interactive TTY, `--rm` auto-cleanup, `--init` (`tini` zombie reaper), and why `-p 8080:8080` binds `0.0.0.0` bypassing host `ufw` rules!, so your code stays reliable, fast, and easy to maintain in production.
Production `Dockerfile` Engineering — Layer Cache Ordering, `COPY` vs `ADD`, `ARG` vs `ENV` & `ENTRYPOINT`
Purpose: To understand and apply Production `Dockerfile` Engineering — Layer Cache Ordering, `COPY` vs `ADD`, `ARG` vs `ENV` & `ENTRYPOINT` in real Docker systems — specifically: How BuildKit invalidates every downstream layer after a cache miss (copy dependency lockfiles BEFORE source code!), why `COPY` is preferred over magic-tar/URL `ADD`, `ARG` (build-time) vs `ENV` (persisted runtime), BuildKit `--mount=type=secret` (never put secrets in `ARG`!), and JSON exec `ENTRYPOINT` + `CMD`, so your code stays reliable, fast, and easy to maintain in production.
Essential Docker CLI Commands — `exec`, `logs`, `stats`, `cp`, `events` & Safe `system prune`
Purpose: To understand and apply Essential Docker CLI Commands — `exec`, `logs`, `stats`, `cp`, `events` & Safe `system prune` in real Docker systems — specifically: Daily operational commands: opening diagnostic shells (`docker exec -it <c> sh`), tailing timestamped logs (`docker logs -f --tail 100 -t`), live CPU/Memory/Net I/O (`docker stats --no-stream`), inspecting disk reclamation (`docker system df`), and understanding `docker buildx prune` vs dangerous `docker system prune --volumes`, so your code stays reliable, fast, and easy to maintain in production.
Containerizing Python Applications — `python:3.12-slim`, `PYTHONUNBUFFERED=1` & Multi-Stage `venv`
Purpose: To understand and apply Containerizing Python Applications — `python:3.12-slim`, `PYTHONUNBUFFERED=1` & Multi-Stage `venv` in real Docker systems — specifically: Why `python:3.12` full image weighs ~1 GB whereas `python:3.12-slim` + multi-stage `/opt/venv` shrinks to ~130 MB, why Alpine `musl` libc breaks binary `manylinux` PyPI wheels (`numpy`, `psycopg`, `cryptography`) forcing slow C compilation, and why `PYTHONUNBUFFERED=1` is mandatory, so your code stays reliable, fast, and easy to maintain in production.
Containerizing Java 21 & Spring Boot — `MaxRAMPercentage`, Non-Heap Headroom & Layered JREs
Purpose: To understand and apply Containerizing Java 21 & Spring Boot — `MaxRAMPercentage`, Non-Heap Headroom & Layered JREs in real Docker systems — specifically: Why shipping a full `jdk` adds ~180 MB of unneeded `javac`/`jmap` attack surface vs `eclipse-temurin:21-jre`, why `-Xmx512m` inside a `512Mi` container STILL triggers Linux `OOMKilled (137)` (Heap + Metaspace + Thread stacks + Direct Buffers > 512Mi!), and Spring Boot `jar -Djarmode=tools extract --layers`, so your code stays reliable, fast, and easy to maintain in production.
Containerizing PHP 8.3 & Laravel — Multi-Stage Composer, `php-fpm` Tuning & Immutable `OPcache`
Purpose: To understand and apply Containerizing PHP 8.3 & Laravel — Multi-Stage Composer, `php-fpm` Tuning & Immutable `OPcache` in real Docker systems — specifically: Installing compiled extensions (`pdo_mysql`, `intl`, `redis`, `opcache`), copying `composer:2` binary cleanly (`COPY --from=composer:2 /usr/bin/composer /usr/bin/composer`), `--no-dev --optimize-autoloader --classmap-authoritative`, and turning off filesystem `stat()` checks via `opcache.validate_timestamps=0`, so your code stays reliable, fast, and easy to maintain in production.
Ubuntu & Debian Base Images — `DEBIAN_FRONTEND=noninteractive`, Single-Layer `apt-get` & Distroless Trade-Offs
Purpose: To understand and apply Ubuntu & Debian Base Images — `DEBIAN_FRONTEND=noninteractive`, Single-Layer `apt-get` & Distroless Trade-Offs in real Docker systems — specifically: When full `glibc` compatibility (`ubuntu:24.04` ~29MB compressed / `debian:bookworm-slim`) beats `alpine` (`musl` DNS/threading quirks) or shell-less `distroless`, avoiding the cached `RUN apt-get update` anti-pattern, and non-interactive `tzdata` installs, so your code stays reliable, fast, and easy to maintain in production.
Docker Storage Drivers — `overlay2` (`lowerdir` / `upperdir` / `merged`), Copy-on-Write & Named Volumes
Purpose: To understand and apply Docker Storage Drivers — `overlay2` (`lowerdir` / `upperdir` / `merged`), Copy-on-Write & Named Volumes in real Docker systems — specifically: How Linux kernel `overlay2` unifies multiple read-only image layers (`lowerdir`) with the container’s writable `upperdir` into a single `merged` view, the `copy_up` first-write penalty on large files, inode limits (`backingFsBlockDev` XFS `d_type=true` `ftype=1`), and why Docker Named Volumes bypass `overlay2` entirely, so your code stays reliable, fast, and easy to maintain in production.
Docker Compose v2 — `service_healthy` Readiness, Embedded `127.0.0.11` DNS, Profiles & Isolated Networks
Purpose: To understand and apply Docker Compose v2 — `service_healthy` Readiness, Embedded `127.0.0.11` DNS, Profiles & Isolated Networks in real Docker systems — specifically: Modern `compose.yaml` (no obsolete `version:` header needed in Compose Spec!): automatic user-defined bridge network with embedded `127.0.0.11` service-name DNS, why plain `depends_on: [db]` only waits for container *process start* (NOT port readiness!), `condition: service_healthy`, `profiles`, and `docker compose watch`, so your code stays reliable, fast, and easy to maintain in production.
Pushing to OCI Registries — `--password-stdin`, Immutable SemVer+SHA Tags, Multi-Arch `buildx` & SBOMs
Purpose: To understand and apply Pushing to OCI Registries — `--password-stdin`, Immutable SemVer+SHA Tags, Multi-Arch `buildx` & SBOMs in real Docker systems — specifically: Registry naming (`<registry>/<namespace>/<repo>:<tag>`), piping PAT/OIDC tokens via `docker login --password-stdin`, why overwriting `:latest` breaks rollbacks, building Apple Silicon + x86_64 multi-arch manifests (`docker buildx build --platform linux/amd64,linux/arm64 --push`), and SBOM/provenance attestations, so your code stays reliable, fast, and easy to maintain in production.
Managed Cloud Containers — AWS ECS Fargate, Cloud Run, Pull-Through Cache Mirrors & Remote BuildKit
Purpose: To understand and apply Managed Cloud Containers — AWS ECS Fargate, Cloud Run, Pull-Through Cache Mirrors & Remote BuildKit in real Docker systems — specifically: Running OCI containers in production without managing EC2 hosts (AWS ECS Fargate, Google Cloud Run scale-to-zero, Azure Container Apps), avoiding Docker Hub anonymous rate limits (`100 pulls / 6 hrs / IP`) in cloud NAT Gateways via ECR/Artifact Registry pull-through caches, and remote `Docker Build Cloud` shared caches, so your code stays reliable, fast, and easy to maintain in production.
Docker vs Kubernetes — Packaging (`OCI` Build) vs Cluster Orchestration & Why `dockershim` Removal Changed Nothing for Dockerfiles
Purpose: To understand and apply Docker vs Kubernetes — Packaging (`OCI` Build) vs Cluster Orchestration & Why `dockershim` Removal Changed Nothing for Dockerfiles in real Docker systems — specifically: Clearing up the industry’s #1 interview myth: **Docker** builds & runs OCI containers on a single machine (and local multi-container Compose stacks), whereas **Kubernetes** schedules, heals, autoscales, and networks thousands of those exact OCI containers across multi-node clusters via `containerd` CRI!, so your code stays reliable, fast, and easy to maintain in production.
Containerizing Ruby & Rails — Multi-Stage Bundler (`BUNDLE_DEPLOYMENT=1`), `libjemalloc2` & Puma
Purpose: To understand and apply Containerizing Ruby & Rails — Multi-Stage Bundler (`BUNDLE_DEPLOYMENT=1`), `libjemalloc2` & Puma in real Docker systems — specifically: Why compiling native C gems (`pg`, `nokogiri`, `ffi`) requires `build-essential` + `libpq-dev` ONLY in the builder stage while the slim runtime needs only `libpq5` + `libjemalloc2`, freezing `Gemfile.lock` with `BUNDLE_DEPLOYMENT=1`, and `RAILS_LOG_TO_STDOUT=1`, so your code stays reliable, fast, and easy to maintain in production.
Containerizing Scala & `sbt` — Coursier Cache Mounts, `sbt stage` vs Fat `assembly` JARs & JRE Runtime
Purpose: To understand and apply Containerizing Scala & `sbt` — Coursier Cache Mounts, `sbt stage` vs Fat `assembly` JARs & JRE Runtime in real Docker systems — specifically: Why shipping an `sbt` + JDK builder image produces a bloated `1.4 GB` container, caching `project/build.properties` + `project/plugins.sbt` + `build.sbt` with BuildKit Coursier cache mounts, and preferring `sbt-native-packager` (`sbt stage`) layered classpaths over slow monolithic `sbt assembly` uber-JAR merge conflicts, so your code stays reliable, fast, and easy to maintain in production.
BuildKit Cache Mounts (--mount=type=cache) & Build Secret Mounts
Purpose: To understand and apply BuildKit Cache Mounts (--mount=type=cache) & Build Secret Mounts in real Docker systems — specifically: Speed up npm/pip/Maven builds 6x without ever baking private tokens into image layers!, so your code stays reliable, fast, and easy to maintain in production.
Multi-Stage Builds into Distroless / Scratch / Alpine Runtimes
Purpose: To understand and apply Multi-Stage Builds into Distroless / Scratch / Alpine Runtimes in real Docker systems — specifically: Strip compilers and shells out of prod images, slashing size and CVE surface by 85%, so your code stays reliable, fast, and easy to maintain in production.
Cross-Compiling linux/amd64 + linux/arm64 Images with docker buildx
Purpose: To understand and apply Cross-Compiling linux/amd64 + linux/arm64 Images with docker buildx in real Docker systems — specifically: Run identical container tags on Apple Silicon laptops and AWS Graviton servers, so your code stays reliable, fast, and easy to maintain in production.
Layer Ordering Discipline & Strict .dockerignore Hygiene
Purpose: To understand and apply Layer Ordering Discipline & Strict .dockerignore Hygiene in real Docker systems — specifically: Ensure editing one source file never invalidates cached dependency layers, so your code stays reliable, fast, and easy to maintain in production.
Linux Namespaces, Control Groups (cgroups v2) & OverlayFS Internals
Purpose: To understand and apply Linux Namespaces, Control Groups (cgroups v2) & OverlayFS Internals in real Docker systems — specifically: Understand what containers actually are under the hood on the Linux kernel, so your code stays reliable, fast, and easy to maintain in production.
Non-Root USER, --cap-drop=ALL, --read-only & no-new-privileges
Purpose: To understand and apply Non-Root USER, --cap-drop=ALL, --read-only & no-new-privileges in real Docker systems — specifically: Contain exploit blast radius even if an application library has a zero-day bug, so your code stays reliable, fast, and easy to maintain in production.
Automated Vulnerability Scanning with Trivy & Syft CycloneDX SBOMs
Purpose: To understand and apply Automated Vulnerability Scanning with Trivy & Syft CycloneDX SBOMs in real Docker systems — specifically: Fail GitHub Actions builds automatically when Critical OS/library CVEs appear, so your code stays reliable, fast, and easy to maintain in production.
Cosign Keyless Image Signing & Private Registry Access Controls
Purpose: To understand and apply Cosign Keyless Image Signing & Private Registry Access Controls in real Docker systems — specifically: Verify cryptographic provenance so clusters run only trusted CI-built images, so your code stays reliable, fast, and easy to maintain in production.
depends_on: service_healthy with Real DB/Redis Readiness Checks
Purpose: To understand and apply depends_on: service_healthy with Real DB/Redis Readiness Checks in real Docker systems — specifically: Stop API containers from crashing at boot before PostgreSQL finishes initializing, so your code stays reliable, fast, and easy to maintain in production.
Internal-Only Backend Bridge Networks vs Public Reverse-Proxy Network
Purpose: To understand and apply Internal-Only Backend Bridge Networks vs Public Reverse-Proxy Network in real Docker systems — specifically: Keep PostgreSQL and Redis completely unreachable from public host ports, so your code stays reliable, fast, and easy to maintain in production.
Compose Secrets, Named Volume Backups & CPU/Memory Resource Limits
Purpose: To understand and apply Compose Secrets, Named Volume Backups & CPU/Memory Resource Limits in real Docker systems — specifically: Prevent one runaway container from starving host RAM or losing stateful data, so your code stays reliable, fast, and easy to maintain in production.
PID 1 Signal Forwarding (tini / exec Form) for Clean SIGTERM Shutdown
Purpose: To understand and apply PID 1 Signal Forwarding (tini / exec Form) for Clean SIGTERM Shutdown in real Docker systems — specifically: Ensure containers stop in 1 second gracefully instead of suffering 10s SIGKILL kills, so your code stays reliable, fast, and easy to maintain in production.
Log Rotation (json-file max-size), Fluentd/Loki Drivers & Prometheus cAdvisor
Purpose: To understand and apply Log Rotation (json-file max-size), Fluentd/Loki Drivers & Prometheus cAdvisor in real Docker systems — specifically: Prevent unrotated container stdout logs from filling 100% of server disks!, so your code stays reliable, fast, and easy to maintain in production.
Live Container Diagnostics (docker stats, inspect, events & nsenter)
Purpose: To understand and apply Live Container Diagnostics (docker stats, inspect, events & nsenter) in real Docker systems — specifically: Debug high memory, DNS resolution, and socket exhaustion on live containers, so your code stays reliable, fast, and easy to maintain in production.
GitHub Actions Registry Caching, Semantic SHA Tags & Rollback Scripts
Purpose: To understand and apply GitHub Actions Registry Caching, Semantic SHA Tags & Rollback Scripts in real Docker systems — specifically: Eliminate mutable :latest tag chaos with immutable commit-SHA deployments, so your code stays reliable, fast, and easy to maintain in production.
Reverse-Proxy Blue/Green Container Cutover & Automated Prune Policies
Purpose: To understand and apply Reverse-Proxy Blue/Green Container Cutover & Automated Prune Policies in real Docker systems — specifically: Swap traffic to verified new containers seamlessly and reclaim disk safely, so your code stays reliable, fast, and easy to maintain in production.
BuildKit Cache Mounts, Secret Mounts (--mount=type=secret) & Layer-Order Mastery
Purpose: To understand and apply BuildKit Cache Mounts, Secret Mounts (--mount=type=secret) & Layer-Order Mastery in real Docker systems — specifically: Cut CI Docker build times by 70% while ensuring private tokens never bake into image layers, so your code stays reliable, fast, and easy to maintain in production.
Distroless / Wolfi / Alpine Minimal Images, Non-Root UIDs & Dropped Linux Capabilities
Purpose: To understand and apply Distroless / Wolfi / Alpine Minimal Images, Non-Root UIDs & Dropped Linux Capabilities in real Docker systems — specifically: Shrink attack surface and image megabytes by stripping shells and package managers from runtime, so your code stays reliable, fast, and easy to maintain in production.
Vulnerability Scanning (Trivy), SBOM Generation & Signed Multi-Arch (amd64/arm64) Releases
Purpose: To understand and apply Vulnerability Scanning (Trivy), SBOM Generation & Signed Multi-Arch (amd64/arm64) Releases in real Docker systems — specifically: Block vulnerable base images in CI and build images that run on both x86 and AWS Graviton, so your code stays reliable, fast, and easy to maintain in production.
Healthchecks, service_completed_successfully Dependencies & Graceful PID 1 Signals
Purpose: To understand and apply Healthchecks, service_completed_successfully Dependencies & Graceful PID 1 Signals in real Docker systems — specifically: Ensure apps wait for ready databases and receive SIGTERM cleanly without 10-second SIGKILL hangs, so your code stays reliable, fast, and easy to maintain in production.
Memory/CPU Cgroups Limits, Log Rotation Drivers & Isolated Internal Networks
Purpose: To understand and apply Memory/CPU Cgroups Limits, Log Rotation Drivers & Isolated Internal Networks in real Docker systems — specifically: Prevent a single runaway container from exhausting host disk space or host RAM, so your code stays reliable, fast, and easy to maintain in production.
Container Filesystem/Overlay2 Internals & Docker Troubleshooting Interviews
Purpose: To understand and apply Container Filesystem/Overlay2 Internals & Docker Troubleshooting Interviews in real Docker systems — specifically: Inspect namespaces, cgroups, zombie processes, and DNS resolution issues confidently, so your code stays reliable, fast, and easy to maintain in production.