0
0
Dockerdevops~10 mins

BuildKit for improved builds in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to enable BuildKit for Docker builds.

Docker
DOCKER_BUILDKIT=[1] docker build .
Drag options to blanks, or click blank then click option'
Atrue
B0
Cenable
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 disables BuildKit, so the build won't use it.
Using 'true' or 'enable' are not valid values for this environment variable.
2fill in blank
medium

Complete the Dockerfile command to use BuildKit's cache mount feature.

Docker
RUN --mount=type=[1],target=/root/.cache pip install -r requirements.txt
Drag options to blanks, or click blank then click option'
Atmpfs
Bbind
Ccache
Dvolume
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bind' mounts host directories, not cache.
Using 'tmpfs' creates temporary memory mounts, not persistent cache.
3fill in blank
hard

Fix the error in the command to build with BuildKit and output a progress bar.

Docker
DOCKER_BUILDKIT=1 docker build --progress=[1] .
Drag options to blanks, or click blank then click option'
Adetailed
Bauto
Cbar
Dplain
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bar' is not a valid progress option.
Using 'detailed' is not recognized by Docker.
4fill in blank
hard

Fill both blanks to create a Dockerfile snippet that uses BuildKit cache and sets a build argument.

Docker
ARG CACHEBUST=[1]
RUN --mount=type=[2],target=/root/.cache pip install -r requirements.txt
Drag options to blanks, or click blank then click option'
A1
Bcache
C0
Dbind
Attempts:
3 left
💡 Hint
Common Mistakes
Using '0' disables cache busting.
Using 'bind' instead of 'cache' causes no caching.
5fill in blank
hard

Fill all three blanks to create a BuildKit-enabled Docker build command with a custom target and output directory.

Docker
DOCKER_BUILDKIT=1 docker build --target [1] --output type=[2],dest=[3] .
Drag options to blanks, or click blank then click option'
Aproduction
Blocal
C./output
Dcache
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache' as output type is invalid here.
Missing the destination path causes errors.