-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use COPY --link
to share Go layer across OS variants / updates
#505
Merged
Conversation
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
touch -t "$date" /usr/local/.go-date-stamp; \ | ||
find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ | ||
rm /usr/local/.go-date-stamp; \ | ||
touch -t "$date" /usr/local; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be a shared jq template or is it too early for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too early for that IMO 😅
tianon
commented
Jan 16, 2024
This makes the Go layer reproducible such that re-pulling it can be avoided when switching between OS variants or OS updates. ```console $ docker buildx build --builder foo --pull --build-arg BUILDKIT_SYNTAX=docker/dockerfile:1 1.21/alpine3.18 --quiet --output type=oci | tar -tv | grep a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 -r--r--r-- 0/0 67061931 1969-12-31 16:00 blobs/sha256/a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 $ docker buildx build --builder foo --pull --build-arg BUILDKIT_SYNTAX=docker/dockerfile:1 1.21/alpine3.19 --quiet --output type=oci | tar -tv | grep a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 -r--r--r-- 0/0 67061931 1969-12-31 16:00 blobs/sha256/a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 $ docker buildx build --builder foo --pull --build-arg BUILDKIT_SYNTAX=docker/dockerfile:1 1.21/bookworm --quiet --output type=oci | tar -tv | grep a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 -r--r--r-- 0/0 67061931 1969-12-31 16:00 blobs/sha256/a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 $ docker buildx build --builder foo --pull --build-arg BUILDKIT_SYNTAX=docker/dockerfile:1 1.21/bullseye --quiet --output type=oci | tar -tv | grep a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 -r--r--r-- 0/0 67061931 1969-12-31 16:00 blobs/sha256/a3881458cc9d5f6798ed03914b3fb322f3620ca53deca3b2c4460676912d16f5 ```
yosifkit
approved these changes
Jan 19, 2024
docker-library-bot
added a commit
to docker-library-bot/official-images
that referenced
this pull request
Jan 20, 2024
Changes: - docker-library/golang@26b9447: Merge pull request docker-library/golang#505 from infosiftr/link-test - docker-library/golang@a6fd6ec: Use `COPY --link` to share Go layer across OS variants / updates - docker-library/golang@09d6a0c: Adjust versions.json field ordering to be more human-friendly
martin-g
pushed a commit
to martin-g/docker-official-images
that referenced
this pull request
Apr 3, 2024
Changes: - docker-library/golang@26b9447: Merge pull request docker-library/golang#505 from infosiftr/link-test - docker-library/golang@a6fd6ec: Use `COPY --link` to share Go layer across OS variants / updates - docker-library/golang@09d6a0c: Adjust versions.json field ordering to be more human-friendly
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes the Go layer reproducible such that re-pulling it can be avoided when switching between OS variants or OS updates.