Setting the quarkus.container-image.labels ? #26633
-
I want to tag my native image conforming to these labels https://github.com/opencontainers/image-spec/blob/main/annotations.md The Note: I expected this page https://quarkus.io/guides/config-reference to have info on setting a So in my pom.xml I put these properties (among many others)
Now when I build my native image and do a
Simply put:
What is the proper way to configure this? As an extra test (to try and see what works) I have added these to my
Only the quarkus.container-image.labels.name2 was present in the image. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Configuring image labels works similar to configuring log levels. Thus, in order to create an image label
|
Beta Was this translation helpful? Give feedback.
-
I think so. A property name in a POM file is syntactically an XML element, and according to https://www.w3.org/TR/xml/#NT-NameChar, We do have a more general problem here. Quarkus configuration relies on mapping a key/value store on various configuration sources. Here is what I found out so far
I found no solution for maven properties and environment variables. According to https://smallrye.io/smallrye-config/2.10.1/config/environment-variables/ , SmallRye Config provides additional conversion rules for maps, but I did not manage to set any container label via env vars, even with non-colliding names like |
Beta Was this translation helpful? Give feedback.
Configuring image labels works similar to configuring log levels.
If a map key (logging category or image label) contains dots, you have to quote the key.
Thus, in order to create an image label
org.opencontainers.image.url
with the value https://some.host/, you have to use