FlashKeepers

Cloud Computing · Professional · Professional Certifications

Docker II: Compose, Networking and Volumes

Dockerfile instructions, layer caching, multi-stage builds, docker compose, bridge and overlay networks, volumes and registries.

About this set

41 basic cards for Professional Cloud Computing. It opens with "What does the FROM instruction do in a Dockerfile?" and "What instruction changes the working directory inside a Dockerfile?". Study it alongside the other Professional sets below.

41 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What does the FROM instruction do in a Dockerfile?
Show answerSpecifies the base image from which the new image inherits
What instruction changes the working directory inside a Dockerfile?
Show answerWORKDIR
What does RUN do in a Dockerfile?
Show answerExecutes a command inside the image during the build process
What instruction copies files from the build context into the image?
Show answerCOPY
What is the difference between COPY and ADD?
Show answerADD can download remote files and auto-extract archives; COPY is simpler and preferred for local files
What does EXPOSE do?
Show answerDocuments which ports the container listens on, but does not actually publish them
What is the difference between CMD and ENTRYPOINT?
Show answerENTRYPOINT specifies the main executable; CMD provides default arguments that can be overridden at runtime
What does the USER instruction do?
Show answerSets the user that runs all subsequent commands and the container itself
What instruction declares a health check for a container?
Show answerHEALTHCHECK
What does the ARG instruction do?
Show answerDefines a build-time variable that can be passed with --build-arg and is not available at runtime
Why should frequently-changed instructions be placed later in a Dockerfile?
Show answerTo preserve the cache of earlier, stable layers and speed up rebuilds
What happens when a layer's cache is invalidated?
Show answerAll subsequent layers are rebuilt, even if their commands have not changed
What does the --no-cache flag do when building an image?
Show answerForces a complete rebuild, skipping all cached layers
How does Docker determine if a cached layer is still valid?
Show answerBy comparing checksums of the layer's commands and the contents of any source files copied into it
What keyword enables multi-stage builds in a Dockerfile?
Show answerFROM with an AS clause, used multiple times in the same file

26 more cards in the app

Study this set free