-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Redesign the multi-stage docker build #16881
Comments
I personally like it a lot! |
Should we move forward? |
I'm not a big fan of maven wrapper but it sounds reasonable if we document this requirement properly. |
I'm +1 I do think we will evolve this in future anyway if buildpack becomes viable. But removing need for this monster of image is worth more than having mvn wrapper use imo. Users who need/want that can customize as need. |
Ok, I will open a PR tomorrow. |
The change follows the discussion from quarkusio#16881. It avoids relying on the centos-quarkus-maven image that should be deprecated. Instead, it relies on the native-image image, and uses the maven/gradle wrappers. It also allows using Mandrel easily. Fix quarkusio#16881.
The change follows the discussion from quarkusio#16881. It avoids relying on the centos-quarkus-maven image that should be deprecated. Instead, it relies on the native-image image, and uses the maven/gradle wrappers. It also allows using Mandrel easily. Fix quarkusio#16881.
RHEL 8.4 was released on 2021-05-21 😉 |
#17764 should take care of it |
Description
Our documentation contains an example of a multi-stages docker file to build a container running a native executable. That example is on https://quarkus.io/guides/building-native-image#using-a-multi-stage-docker-build.
That example is using a Quarkus image as based that we would like to retire (quay.io/quarkus/centos-quarkus-maven:21.0.0-java11).
Implementation ideas
Here is another working variant that uses an image that we will continue to produce regularly:
The idea is to rely on the maven wrapper instead of expecting Maven to be provided by the base image. First, it allows the user to decide which version of Maven should be used (3.6.3 vs. 3.8.1). It also makes the usage of Gradle straightforward.
That new requirement demand the user to run
mvn -N io.takari:maven:0.7.7:wrapper
first to install the maven wrapper if not already there.@maxandersen @n1hility @geoand @mkouba WDYT? (I didn't create a PR yet, because I want to discuss it first).
NOTE: The go-offline is used to provision in its own layer the required dependencies, meaning that if you change your code and re-build it will recover from the layer
COPY src ...
The text was updated successfully, but these errors were encountered: