Skip to content

Commit

Permalink
Clarify how docker image publishing registry is determined
Browse files Browse the repository at this point in the history
Closes gh-31820
  • Loading branch information
scottfrederick committed Jul 20, 2022
1 parent a7dfeae commit 4e0b3aa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ The generated image can be published to a Docker registry by enabling a `publish
If the Docker registry requires authentication, the credentials can be configured using `docker.publishRegistry` properties.
If the Docker registry does not require authentication, the `docker.publishRegistry` configuration can be omitted.

NOTE: The registry that the image will be published to is determined by the registry part of the image name (`docker.example.com` in these examples).
If `docker.publishRegistry` credentials are configured and include a `url` property, this value is passed to the registry but is not used to determine the publishing registry location.

[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ tasks.named("bootBuildImage") {
publishRegistry {
username = "user"
password = "secret"
url = "https://docker.example.com/v1/"
email = "[email protected]"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ tasks.named<BootBuildImage>("bootBuildImage") {
publishRegistry {
username = "user"
password = "secret"
url = "https://docker.example.com/v1/"
email = "[email protected]"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ The generated image can be published to a Docker registry by enabling a `publish
If the Docker registry requires authentication, the credentials can be configured using `docker.publishRegistry` parameters.
If the Docker registry does not require authentication, the `docker.publishRegistry` configuration can be omitted.

NOTE: The registry that the image will be published to is determined by the registry part of the image name (`docker.example.com` in these examples).
If `docker.publishRegistry` credentials are configured and include a `url` parameter, this value is passed to the registry but is not used to determine the publishing registry location.

[source,xml,indent=0,subs="verbatim,attributes",tabsize=4]
----
include::../maven/packaging-oci-image/docker-pom.xml[tags=docker]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<publishRegistry>
<username>user</username>
<password>secret</password>
<url>https://docker.example.com/v1/</url>
<email>[email protected]</email>
</publishRegistry>
</docker>
</configuration>
Expand Down

0 comments on commit 4e0b3aa

Please sign in to comment.