โ† All DevOps Flashcard Decks

Docker & Containerization Flashcards

6 cards from real DevOps practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Docker & Containerization flashcards as text
  1. What is a Docker image?

    Answer: A read-only template used to create Docker containers

    A Docker image is a read-only, layered template built from a Dockerfile that serves as the blueprint for creating containers.

  2. Which Dockerfile instruction sets the base image for a build?

    Answer: FROM

    The FROM instruction in a Dockerfile specifies the parent image upon which all subsequent instructions are layered.

  3. What command builds a Docker image from a Dockerfile in the current directory?

    Answer: docker build .

    The `docker build .` command reads the Dockerfile in the current directory and builds an image using that context.

  4. What is the difference between a Docker container and a Docker image?

    Answer: A container is a running instance of an image; an image is a static template

    An image is a static, layered filesystem snapshot, while a container is a live, running process created from that image with a writable layer.

  5. Which Docker networking driver allows containers on the same host to communicate using container names?

    Answer: bridge

    The bridge network driver creates a private internal network on the host and enables containers connected to the same bridge to communicate by name.

  6. What does the EXPOSE instruction in a Dockerfile do?

    Answer: Documents which port the container listens on at runtime

    EXPOSE is documentation that informs Docker and users which port the container application listens on; it does not automatically publish the port to the host.