-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support for docker.io #1560
Conversation
@@ -236,12 +237,12 @@ private ImageReference(String registry, String repository, String tag) { | |||
} | |||
|
|||
/** | |||
* Gets the registry portion of the {@link ImageReference}. | |||
* Gets the registry host of the {@link ImageReference}. |
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.
What are the consequences of this? That is, I hope jib:dockerBuild
will push docker.io/some/name
instead of registry-1.docker.io/some/name
.
Also, should RegistryAliasGroup.getHost()
be done outside of this? The getters of this class simply returns its fields as-is, and we may want to keep it that way, as an immutable class and a pure representation of the parsed reference.
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.
That is a good question! I did this so that ImageReference#toString()
would preserve the docker.io
prefix.
With this change, jib:dockerBuild -Dimage=docker.io/foo/bar/baz
records the image as foo/bar/baz
. But jib:buildTar -Dimage=docker.io/foo/bar/baz
records the repoTag
as docker.io/foo/bar/baz
.
But if I do a docker build -t docker.io/foo/bar/baz .
, docker reports the built image without the docker.io
prefix. And the result of docker save docker.io/foo/bar/baz
doesn't have docker.io
either.
I'll move this remapping into parse()
.
jib-core/src/main/java/com/google/cloud/tools/jib/event/events/LogEvent.java
Outdated
Show resolved
Hide resolved
Kokoro-macos build failure occurred when the wrapper tried to download the gradle instance.
|
Fixes #1549
RegistryAliasGroup
to manage registry → host mappings.ImageReference#getRegistry()
to remap the registry; this class does other mappings, likelibrary/
prefixing of the repository.registry-1.docker.io
docker.io
andregistry-1.docker.io
to the Docker Hub registry aliases inRegistryAliasGroup
- add atoString()
toLogEvent
to help track down a spurious test error!