Flashcard Deck · 20 cards · Public

Docker & Containerization Mastery

Master modern containerization with this comprehensive flashcard deck covering Docker architecture, Dockerfile optimization, multi-stage builds, networking models, and storage persistence.

Cards in this deck

(20 cards)

Preview terms and definitions before starting your study session.

#1
Term
Docker Image vs. Docker Container
Definition
A Docker Image is a read-only, immutable template containing application code, libraries, and dependencies. A Docker Container is a runnable, isolated instance of an image with a thin writable layer added on top.
#2
Term
Underlying Linux Technologies for Containers
Definition
Containers rely on two key Linux kernel features:
  • Namespaces: Provide process, network, user, and mount point isolation.
  • Control Groups (cgroups): Enforce limits and monitor usage of system resources like CPU, memory, and disk I/O.
#3
Term
Dockerfile: CMD vs. ENTRYPOINT
Definition
  • ENTRYPOINT: Defines the core executable that always runs when the container starts.
  • CMD: Provides default arguments to ENTRYPOINT or acts as a default command. Can be easily overridden from the command line (e.g., docker run image <new-cmd>).
#4
Term
Dockerfile: COPY vs. ADD
Definition
  • COPY: Copies local files/directories from the host into the container filesystem. Preferred for basic file copying.
  • ADD: Inherits COPY functionality but also automatically extracts compressed archives (.tar.gz) and supports fetching remote URLs.
#5
Term
Docker Layer Caching
Definition
Each instruction in a Dockerfile creates a read-only image layer. Docker caches these layers during builds. If an instruction and its context remain unchanged, Docker reuses the cached layer, significantly speeding up subsequent builds.
#6
Term
Optimizing Layer Caching Order
Definition
Order Dockerfile commands from least frequently changed to most frequently changed. For example, copy dependency definitions (package.json, requirements.txt) and run installations before copying the application source code.
#7
Term
Multi-Stage Builds
Definition
A technique using multiple FROM statements in a single Dockerfile. It allows building artifacts in heavyweight temporary stages (with build tools/compilers) and copying only the final binaries/assets into a lean runtime image.
#8
Term
Default Bridge Network vs. User-Defined Bridge Network
Definition
  • Default Bridge: Containers can only communicate via raw IP addresses unless linked legacy-style.
  • User-Defined Bridge: Provides automatic DNS resolution, allowing containers on the same network to communicate using their container names.
Showing 8 of 20 cards in this deck.
Study All Now