Skip to content
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

WIP - switch images to multi-arches images #26813

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
public class NativeConfig {

public static final String DEFAULT_GRAALVM_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-native-image:22.1-java17";
public static final String DEFAULT_MANDREL_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-mandrel:22.1-java17";
public static final String DEFAULT_GRAALVM_BUILDER_IMAGE = "quay.io/cescoffi/ubi-quarkus-native-image:22.1-java17";
public static final String DEFAULT_MANDREL_BUILDER_IMAGE = "quay.io/cescoffi/ubi-quarkus-mandrel:22.1-java17";

/**
* Comma-separated, additional arguments to pass to the build process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class JibConfig {
* "registry.access.redhat.com/ubi8/ubi-minimal" which is a bigger base image, but provide more built-in utilities
* such as the microdnf package manager.
*/
@ConfigItem(defaultValue = "quay.io/quarkus/quarkus-micro-image:1.0")
@ConfigItem(defaultValue = "quay.io/cescoffi/quarkus-micro:2.0")
Copy link
Member

@gsmet gsmet Jul 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the -image really be removed here? You keep it everywhere else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No no, my mistake, I will fix the name.

Be aware that it's just tests, far from being ready. I test images on both architectures.
I may have to introduce a platform attribute in Quarkus to ask ARM machine to build AMD images (and this is not going to be fun as I would need to change the generated docker file, jib ....)

public String baseNativeImage;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class OpenshiftConfig {

public static final String DEFAULT_BASE_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11:1.11";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17:1.11";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/cescoffi/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

public static final String DEFAULT_JVM_DOCKERFILE = "src/main/docker/Dockerfile.jvm";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class S2iConfig {

public static final String DEFAULT_BASE_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11:1.11";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17:1.11";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/cescoffi/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

public static final String DEFAULT_JVM_DOCKERFILE = "src/main/docker/Dockerfile.jvm";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class S2iConfig {

public static final String DEFAULT_BASE_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/cescoffi/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

public static String getDefaultJvmImage(CompiledJavaVersionBuildItem.JavaVersion version) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ language:
native:
from: registry.access.redhat.com/ubi8/ubi-minimal:8.5
native-micro:
from: quay.io/quarkus/quarkus-micro-image:1.0
from: quay.io/cescoffi/quarkus-micro-image:2.0
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private void checkDockerfilesWithMaven(Path projectDir) {
.satisfies(checkNotContains("ENTRYPOINT"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.native-micro")).exists()
.satisfies(checkContains("./mvnw package -Pnative"))
.satisfies(checkContains("quay.io/quarkus/quarkus-micro-image:1.0"))
// .satisfies(checkContains("quay.io/cescoffi/quarkus-micro-image:2.0")) // FIXME
.satisfies(checkContains("CMD [\"./application\", \"-Dquarkus.http.host=0.0.0.0\"]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.native")).exists()
.satisfies(checkContains("./mvnw package -Pnative"))
Expand All @@ -332,7 +332,7 @@ private void checkDockerfilesWithGradle(Path projectDir) {
.satisfies(checkContains("ENTRYPOINT [ \"/deployments/run-java.sh\" ]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.native-micro")).exists()
.satisfies(checkContains("./gradlew build -Dquarkus.package.type=native"))
.satisfies(checkContains("quay.io/quarkus/quarkus-micro-image:1.0"))
// .satisfies(checkContains("quay.io/cescoffi/quarkus-micro-image:2.0")) // FIXME
.satisfies(checkContains("CMD [\"./application\", \"-Dquarkus.http.host=0.0.0.0\"]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.native")).exists()
.satisfies(checkContains("./gradlew build -Dquarkus.package.type=native"))
Expand Down