0
0
Dockerdevops~5 mins

Image size and minimal base images in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a minimal base image in Docker?
A minimal base image is a very small Docker image that contains only the essential files needed to run applications. It helps reduce the overall image size and improves efficiency.
Click to reveal answer
beginner
Why is keeping Docker image size small important?
Smaller Docker images use less disk space, download faster, and start containers quicker. This saves bandwidth and improves deployment speed.
Click to reveal answer
intermediate
Name two popular minimal base images used in Docker.
Two popular minimal base images are Alpine Linux and BusyBox. Both are very small and commonly used to build lightweight containers.
Click to reveal answer
intermediate
How can you reduce Docker image size when building your own image?
You can reduce image size by using minimal base images, removing unnecessary files, combining commands in one layer, and cleaning up package caches.
Click to reveal answer
advanced
What is the trade-off when using very minimal base images like Alpine?
Minimal base images may lack some libraries or tools, so you might need to install extra packages. This can add complexity but keeps the image small.
Click to reveal answer
Which of these is a minimal base image commonly used in Docker?
AAlpine
BUbuntu Desktop
CWindows Server
DCentOS Full
Why should you keep Docker images small?
ATo save disk space and speed up downloads
BTo make containers run slower
CTo increase image complexity
DTo use more bandwidth
What is a common method to reduce Docker image size?
AAvoid cleaning package caches
BUse minimal base images
CKeep all build files inside the image
DAdd more layers
What might you need to do when using a minimal base image like Alpine?
AUse Windows commands
BAdd a graphical user interface
CIncrease image size intentionally
DInstall missing libraries or tools
Which command helps reduce image layers in a Dockerfile?
AUse multiple RUN commands separately
BAdd unnecessary files
CCombine multiple commands with && in one RUN
DUse COPY multiple times
Explain what a minimal base image is and why it is useful in Docker.
Think about the smallest starting point for your container.
You got /2 concepts.
    Describe at least three ways to reduce Docker image size when building your own images.
    Focus on Dockerfile best practices and cleanup.
    You got /4 concepts.