TOPIC-WISE INTERVIEW PRACTICE

Docker & Kubernetes interview questions and quick answers

Images, containers, Dockerfiles, pods and deployments, from first principles.

Review 1,150 questions and short answers on Docker & Kubernetes. Start with real examples below, then search, practise and follow links to full explanations.

1,150 questionsFree revision22 topics
START HERE

Docker & Kubernetes: questions worth revising first

These answers come from AI Tapri's existing question bank and published interview guides. Open each answer and read the linked in-depth guide for examples and context.

01What is the difference between alpine, slim and distroless base images?

alpine is a tiny distro using musl libc and apk. slim variants are trimmed Debian images using glibc. distroless images contain only your app and its runtime, with no shell or package manager, giving the smallest attack surface.

Read the full explanation
02How would you back up the data in a Docker volume?

Run a temporary container that mounts the volume and a host folder, then tar the volume contents into the host folder. Restore by extracting that archive into a volume.

Read the full explanation
03What is the difference between CMD and ENTRYPOINT in a Dockerfile?

ENTRYPOINT sets the program the container always runs, and CMD sets default arguments or a default command that is easy to override. Arguments passed to docker run replace CMD but are appended to ENTRYPOINT; changing ENTRYPOINT needs the --entrypoint flag.

Read the full explanation
04Why do Dockerfiles chain commands with && in one RUN instruction?

Each RUN creates a layer, and deleting files in a later layer does not shrink the image. Chaining install and cleanup in one RUN means the temporary files never get stored in any layer.

Read the full explanation
05Does depends_on in Docker Compose wait until the database is ready?

By default no. depends_on only controls start order, not readiness. To wait for a healthy service, add a healthcheck and use depends_on with condition: service_healthy.

Read the full explanation
06What is the difference between docker compose stop, down and down -v?

stop halts containers but keeps them. down stops and removes containers and networks. down -v also deletes the named volumes, which destroys stored data.

Read the full explanation
07What is Docker?

Containerization platform. Package app + dependencies in image, run anywhere. Lightweight than VMs.

08Explain images vs containers.

Image is template (read-only); container is running instance (read-write). Build image, run container.

YOUR PRACTICE SPACE

Find your next answer.

Pick a topic, search a keyword, or open a question to reveal the answer.

1,150 questions available
DOCKER & KUBERNETES

Docker & Kubernetes quick answers

Showing 18 of 1150
1132 remaining

Free to practise. No account needed. Made for quick revision, not rote memorisation.

Keep preparing for Docker & Kubernetes

Quick answers help with recall; detailed guides explain the reasoning, examples and common mistakes behind each answer.

More topics to practise