quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.49k stars 2.59k forks source link

Define a build items for arbitrary instruction addition during dockerfile generation. #41773

Open iocanel opened 1 month ago

iocanel commented 1 month ago

Description

In the context Regenerating project files we would like to be able to regenerate docker files from the CLI.

In some cases it could be useful for extensions to contributed to additional instructions added during dockerfile generation.

Implementation ideas

So, we could have a MultiBuildItem that accepts an List of instructions that will be added to the generated dockerfile. The build item should also have an field (possibly enum) to select the target (jvm, native, native-micro).

Those build items could live in an SPI module of a new dockerfiles extension (similar to how kubernetes spi works).

quarkus-bot[bot] commented 1 month ago

/cc @geoand (kubernetes)

iocanel commented 1 month ago

/cc @cescoffier (regenerate project files)