Skip to content

Boarding pass · Docker Intermediate

Docker · Intermediate interview

An AI mock interview for developers comfortable with Docker basics. Go deeper into multi-stage builds and image size, networking, data management, and operating containers.

20–30 minEstimated6 questionsTailored live12 model answersTo study
  • Voice interview
  • Live feedback
  • Browser-only
  • No installation required

Your report · sample

AI Readiness Score

/100
Content score English score

Finish the mock and get this report — scored on content and English, with concrete tips and a model answer for every question, plus a study plan.

Your flight path

Five steps to interview-ready.

From a quick warm-up to a personalised study plan — here's the whole loop, and what you get at each gate.

  1. Step 01

    Preparation

    Skim the topics and warm up — you're briefed before takeoff.

  2. Step 02

    AI Interview

    A realistic AI interviewer asks tailored questions — answer by voice or text.

  3. Step 03

    Instant Score

    Finish and get a 0–100 readiness score across content and English.

  4. Step 04

    AI Feedback

    Concrete tips and a rewritten model answer for every response.

  5. Step 05

    Study Plan

    A personalised plan targets your weakest areas — so the next run scores higher.

Preview the AI demo

See one answer scored, end to end.

The whole loop on sample data — question, your answer, instant feedback and a study plan. Hover to pause.

aevrofy.com/session · live demoPlaying

Interviewer · Question 1

“Tell me about yourself.”

Who it's for

  • Developers who containerize their own services
  • Engineers building CI/CD images
  • Anyone targeting mid-level DevOps roles
  • Devs sharpening before interviews

What you'll practice

  • Multi-stage builds and slim images
  • Docker networking between containers
  • Volumes, persistence and config
  • Healthchecks, limits and logging

Topics covered

What this level expects.

Builds

  • Multi-stage builds
  • Image size
  • Build cache & .dockerignore

Networking

  • Network types
  • Service discovery
  • Expose vs publish

Data

  • Volumes vs mounts
  • Persistence & backup
  • Secrets & config

Operations

  • Healthchecks & restart
  • Resource limits
  • Logging

Practice questions

12 questions, with model answers.

Read them, then run the live mock to answer out loud and get scored. Tap any question to reveal a model answer.

01What is a multi-stage build and why use one?

A multi-stage build uses multiple FROM stages in one Dockerfile — a build stage with compilers and dev dependencies, and a final stage that copies only the built artifacts. This keeps build tooling out of the runtime image, dramatically shrinking it and reducing attack surface. You get a small, clean production image without a separate build script.

FROM node:20 AS build
WORKDIR /app
COPY . . 
RUN npm ci && npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
02How do you reduce Docker image size?

Use a small base (alpine or distroless), multi-stage builds to drop build tooling, combine and clean up in RUN layers (remove caches/apt lists), copy only what you need, and add a .dockerignore to keep junk out of the build context. Fewer and smaller layers mean faster pulls, less storage, and a smaller attack surface.

03How do you optimize the build cache, and what does .dockerignore do?

Order instructions so rarely-changing steps (installing dependencies) come before frequently-changing ones (copying source), so a code change doesn't invalidate the dependency layer. .dockerignore excludes files (node_modules, .git, build output) from the build context, which speeds the build, avoids cache busting from irrelevant changes, and keeps secrets out of the image. Together they make rebuilds fast.

04What are the main Docker network types?

bridge is the default for standalone containers on a host — they get a private network and can talk to each other if on the same user-defined bridge. host removes network isolation so the container shares the host's network stack directly. none disables networking. overlay networks span multiple hosts for Swarm/clustered setups. Most app setups use a user-defined bridge network.

05How do containers discover and communicate with each other?

On a user-defined bridge network (which Compose creates automatically), Docker provides DNS so containers can reach each other by service/container name instead of IP — your app connects to db:5432 because 'db' resolves to that container. The default legacy bridge doesn't give name resolution, which is why user-defined networks (or Compose) are recommended.

06What's the difference between EXPOSE and publishing a port?

EXPOSE in a Dockerfile is documentation/metadata that a container listens on a port; it doesn't make it reachable from the host. Publishing with -p (or Compose ports) actually maps a host port to the container port. Containers on the same network can reach each other's exposed ports without publishing; publishing is only needed to reach a container from the host or outside.

07What's the difference between named volumes, bind mounts, and tmpfs?

Named volumes are Docker-managed storage, portable and ideal for persistent app/database data. Bind mounts map a specific host path into the container — great for live-editing source in dev but tied to the host layout. tmpfs mounts live in memory and vanish on stop, for sensitive or scratch data. You pick based on whether you need managed persistence, host access, or ephemeral memory storage.

08How do you persist and back up container data?

Keep stateful data in named volumes rather than the container's writable layer, so removing/recreating the container doesn't lose data. To back up, you run a temporary container that mounts the volume and tars its contents out (or use the database's own dump tools), and restore by reversing it. The principle is that containers are disposable and state lives in volumes you manage and back up.

09How should you handle configuration and secrets?

Inject configuration at run time via environment variables, mounted config files, or Compose env files — never bake environment-specific config into the image. Secrets shouldn't go in the image or plain env if avoidable; use Docker/Swarm secrets, a secrets manager, or mounted files with restricted access, and keep them out of build args and image history. The image stays generic and portable across environments.

10How do healthchecks and restart policies work?

A HEALTHCHECK runs a command periodically to report whether the container is healthy, which orchestrators and Compose use to gate traffic or restarts. Restart policies (--restart no/on-failure/always/unless-stopped) tell Docker whether to automatically restart a container that exits, improving resilience. Together they keep a service available and let the platform react to failures.

11How and why do you set resource limits on containers?

You cap CPU (--cpus) and memory (--memory) so one container can't starve others or take down the host — important for density and stability. Without limits, a memory leak or runaway process can exhaust the machine. In production these limits map to the orchestrator's resource requests/limits, which also drive scheduling decisions.

12How do you handle logging from containers?

Containerized apps should log to stdout/stderr, and Docker captures that via a logging driver (json-file by default, or syslog, fluentd, etc.). In production you ship those logs to a central system (ELK, Loki, a cloud logging service) rather than reading them per-container, and you configure log rotation to stop json-file logs filling the disk. The app stays stateless; logs flow out to the platform.

Preparation tips

Walk in ready.

  • Practise shrinking an image with multi-stage + alpine
  • Know why a .dockerignore matters for build cache
  • Be able to explain Docker's default bridge network
  • Set CPU/memory limits on a container

Ready for the real thing?

Run a 6-question Docker mock interview, answer out loud, and get a readiness score with tips and model answers.

More intermediate interviews

Aevrofy · Docker intermediate interview prep