Interview Q&A / Docker & Kubernetes

INTERVIEW Q&A · 67 QUESTIONS

Docker & Kubernetes interview questions

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

  1. Why 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.

    BeginnerQuick answer1 min read