Complete the command to enable BuildKit for Docker builds.
DOCKER_BUILDKIT=[1] docker build .Setting DOCKER_BUILDKIT=1 enables BuildKit for faster and more efficient Docker builds.
Complete the Dockerfile command to use BuildKit's cache mount feature.
RUN --mount=type=[1],target=/root/.cache pip install -r requirements.txtThe cache mount type allows BuildKit to cache files between builds, speeding up repeated installs.
Fix the error in the command to build with BuildKit and output a progress bar.
DOCKER_BUILDKIT=1 docker build --progress=[1] .
The --progress=auto option lets Docker choose the best progress output, including a progress bar in terminals.
Fill both blanks to create a Dockerfile snippet that uses BuildKit cache and sets a build argument.
ARG CACHEBUST=[1] RUN --mount=type=[2],target=/root/.cache pip install -r requirements.txt
Setting ARG CACHEBUST=1 allows cache busting, and --mount=type=cache enables caching pip files.
Fill all three blanks to create a BuildKit-enabled Docker build command with a custom target and output directory.
DOCKER_BUILDKIT=1 docker build --target [1] --output type=[2],dest=[3] .
Use --target production to build a specific stage, --output type=local to output files locally, and dest=./output to set the output folder.