forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: use COPY --link to increase Docker cache hit frequency
The --link flag is a feature of Docker BuildKit which tells Docker to treat the COPY'd layer independently of previous layers, enabling more aggressive build caching. For more details, see this Docker blog post [1]. When using COPY --link to copy files from a stage that does not contain /etc/passwd, we must --chown with $APP_USER_ID rather than app. Otherwise, the build would fail with "unknown user id". [1] https://www.docker.com/blog/image-rebase-and-improved-remote-cache-support-in-new-buildkit/
- Loading branch information
1 parent
5db5e79
commit 3a4f48f
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- [Improvement] Made Docker cache hits more frequent during the openedx image build via BuildKit's `COPY --link` feature (by @kdmccormick). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters