Plumb through the notion of build-time repositories. #1169
Merged
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.
There are three interesting use cases enabled by this change:
./packages
warnings with our private images.Currently for our private images, we pull private packages via GCS fuse mounted to
./packages/
. This results in warnings fromapk
when the indices are updated today because this path does not exist.By making
./packages
a build-time only thing, this goes away.Currently it is impossible to use
https://user:pass@repo
style repositories without the credential leaking into the image's/etc/apk/repositories
.With this change, credentialed URLs may be passed to
--build-repository-append
and the credentials will only be used for the initial image construction and not be present in the final image.HTTP_AUTH
without breakingapk update
We uncovered an unfortunate side-effect of switching from
./packages
toapk.cgr.dev/chainguard-private
for our packages:apk update
breaks.With the former, we get a
WARNING
that./packages
is not found (see1.
above).With the latter, we get a
WARNING
that the caller isn't authorized, but unlike./packages
it returns a non-zero exit code breakingDockerfile
builds.Armed with this change, we can move
apk.cgr.dev/chainguard-private
into ourbuild_repositories
, specify auth at build-time viaHTTP_AUTH
and avoid the private repository URL leaking into the final image causingapk update
to break.