Flashcards · Docker · Free
Docker flashcards, generated for you.
Example Docker study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example Docker flashcards
What does Docker do?
Docker containerizes applications by packaging code, runtime, dependencies, and config into isolated, portable containers that run consistently across environments.
What's the difference between a Docker image and a container?
An image is a read-only blueprint/template; a container is a running instance of that image. One image can spawn many containers.
Explain the purpose of a Dockerfile.
A Dockerfile is a text file with instructions (FROM, RUN, COPY, EXPOSE, CMD, etc.) that define how to build a Docker image layer-by-layer.
What command starts a container from an image, and what's a key difference between `docker run` and `docker create`?
`docker run` creates and starts a container in one step; `docker create` only creates it without starting. `docker start` then launches a created container.
How do you map ports in Docker? Give an example.
Use the `-p` flag: `docker run -p 8080:3000 image_name` maps host port 8080 to container port 3000. Traffic on host:8080 forwards to container:3000.
What is a Docker volume and why use it?
A volume is persistent storage outside the container filesystem. Use volumes to persist data, share files between host/container, or enable data to survive container deletion.
What's the purpose of `docker-compose` and what file does it use?
`docker-compose` orchestrates multi-container apps using a `docker-compose.yml` file. It defines services, networks, volumes, and environment in one declarative file, then runs `docker-compose up` to start everything.
Explain the difference between `docker exec` and `docker run`.
`docker run` creates and starts a new container; `docker exec` runs a command inside an already-running container. Use `docker exec -it <container> bash` to open a shell in a live container.
What does `docker ps` show and how is `docker ps -a` different?
`docker ps` lists running containers; `docker ps -a` shows all containers (running and stopped). Both display container ID, image, status, ports, and names.
What is a Docker network and why would you create a custom one?
A Docker network connects containers so they can communicate by name. Create a custom network (e.g., `docker network create mynet`) to enable service-to-service communication and isolation without relying on --link (deprecated).
Make your own Docker study set
Flashcards for related topics
Studying Docker to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →