Skip to content

Commit

Permalink
Document tags format used in Gradle and Maven plugins
Browse files Browse the repository at this point in the history
Closes gh-33088
  • Loading branch information
mhalbritter committed Nov 14, 2023
1 parent 83da5a5 commit 22a991b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[spring-boot-gradle-plugin-documentation]]
= Spring Boot Gradle Plugin Reference Guide
Andy Wilkinson; Scott Frederick
Andy Wilkinson; Scott Frederick; Moritz Halbritter
v{gradle-project-version}
:!version-label:
:doctype: book
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ The value supplied will be passed unvalidated to Docker when creating the builde
| `tags`
|
| A list of one or more additional tags to apply to the generated image.
The values provided to the `tags` option should be full image references in the form of `[image name]:[tag]` or `[repository]/[image name]:[tag]`.
The values provided to the `tags` option should be *full* image references.
See <<build-image.customization.tags, the tags section>> for more details.
|

| `buildCache`
Expand Down Expand Up @@ -213,6 +214,24 @@ You can override this behaviour as shown in the <<build-image.examples.builder-c



[[build-image.customization.tags]]
=== Tags format

The values provided to the `tags` option should be *full* image references.
The accepted format is `[domainHost:port/][path/]name[:tag][@digest]`.

If the domain is missing, it defaults to `docker.io`.
If the path is missing, it defaults to `library`.
If the tag is missing, it defaults to `latest`.

Some examples:

* `my-image` leads to the image reference `docker.io/library/my-image:latest`
* `my-repository/my-image` leads to `docker.io/my-repository/my-image:latest`
* `example.com/my-repository/my-image:1.0.0` will be used as is



[[build-image.examples]]
== Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ The value supplied will be passed unvalidated to Docker when creating the builde

| `tags`
| One or more additional tags to apply to the generated image.
The values provided to the `tags` option should be full image references in the form of `[image name]:[tag]` or `[repository]/[image name]:[tag]`.
The values provided to the `tags` option should be *full* image references.
See <<build-image.customization.tags, the tags section>> for more details.
|

| `buildCache`
Expand Down Expand Up @@ -221,6 +222,24 @@ You can override this behaviour as shown in the <<build-image.examples.builder-c

For more details, see also <<build-image.examples,examples>>.



[[build-image.customization.tags]]
=== Tags format

The values provided to the `tags` option should be *full* image references.
The accepted format is `[domainHost:port/][path/]name[:tag][@digest]`.

If the domain is missing, it defaults to `docker.io`.
If the path is missing, it defaults to `library`.
If the tag is missing, it defaults to `latest`.

Some examples:

* `my-image` leads to the image reference `docker.io/library/my-image:latest`
* `my-repository/my-image` leads to `docker.io/my-repository/my-image:latest`
* `example.com/my-repository/my-image:1.0.0` will be used as is

include::goals/build-image.adoc[leveloffset=+1]
include::goals/build-image-no-fork.adoc[leveloffset=+1]

Expand Down

0 comments on commit 22a991b

Please sign in to comment.