Defer to builder run image mirror if not publishing (daemon case) #783
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.
Signed-off-by: David Freilich [email protected]
Summary
This work attempts to make the selection of
run-image-mirrors
more intuitive. Previously, our selection of a run image mirror looked like this:pack build --run-image
pack build test-app
will look for a run image mirror indockerhub
, whilepack build gcr.io/test-app
will look for a run image mirror ingcr.io
)pack set-run-image-mirror
In practice, this was confusing to users (see #712, and a conversation on slack here). While the above priorities made sense when thinking about publishing images (if you are publishing, we want to minimize the number of bits you have to stream, so using a run image mirror in that registry would be optimal), they were suboptimal when users were doing local development, where users would have expected the run image to be in the same registry as the builder.
As such, this PR addresses changes priority (2) above, adjusting between selecting a run image mirror:
pack build --publish
, referred to as a non-daemon
case)pack build
, referred to as thedaemon
case)Output
Before
$ pack build
$ pack build --publish
After
$ pack build
$ pack build --publish
Documentation
Related
Resolves #712