diff --git a/Dockerfile.template b/Dockerfile.template index 99febb0d7..3e77ec986 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}" WORKDIR /root -COPY ${tar_path}/${tar_name} . -RUN ["pip", "install", "${tar_name}[full]"] +RUN --mount=type=bind,source=${tar_path}/${tar_name},target=/tmp/${tar_name} \ + pip install --no-cache-dir /tmp/${tar_name}[full] ENTRYPOINT ["b2"] CMD ["--help"] diff --git a/changelog.d/+docker_optimization.fixed.md b/changelog.d/+docker_optimization.fixed.md new file mode 100644 index 000000000..47a764754 --- /dev/null +++ b/changelog.d/+docker_optimization.fixed.md @@ -0,0 +1 @@ +Do not include build cache in official `b2` docker image.