Complete the Dockerfile line to use a cache mount for faster builds.
RUN --mount=type=[1],target=/root/.cache pip install -r requirements.txtThe cache mount type allows Docker to cache files between builds, speeding up repeated steps like package installation.
Complete the Dockerfile RUN command to specify the cache mount with an ID.
RUN --mount=type=cache,[1]=mycache,target=/root/.cache pip install -r requirements.txtThe id option names the cache mount so Docker can reuse it across builds.
Fix the error in this Dockerfile RUN command to correctly use cache mount syntax.
RUN --mount=type=[1],target=/root/.cache,id=mycache pip install -r requirements.txtThe mount type must be cache to enable caching. Other types do not support cache ID.
Fill both blanks to create a cache mount with an ID and target directory.
RUN --mount=type=[1],[2]=mycache,target=/root/.cache pip install -r requirements.txt
The mount type must be cache and the cache identifier is set with id.
Fill all three blanks to create a cache mount with an ID, target directory, and sharing mode.
RUN --mount=type=[1],[2]=mycache,target=[3] pip install -r requirements.txt
The mount type is cache, the cache ID is set with id, and the target directory is /root/.cache.