Skip to content

Commit

Permalink
Merge pull request #28362 from rsvoboda/update-ubi-images
Browse files Browse the repository at this point in the history
[2.13] Update to ubi 8.6 and the latest openjdk images
  • Loading branch information
cescoffier authored Oct 6, 2022
2 parents f4017e4 + 2b5ec2c commit 79cf3da
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ The project generation has also provided a `Dockerfile.native` in the `src/main/

[source,dockerfile]
----
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6
WORKDIR /work/
COPY target/*-runner /work/application
RUN chmod 775 /work
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/quarkus-runtime-base-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In this case, you need to use a multi-stage `dockerfile` to copy the required li
[source, dockerfile]
----
# First stage - install the dependencies in an intermediate container
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 as BUILD
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6 as BUILD
RUN microdnf install freetype
# Second stage - copy the dependencies
Expand All @@ -61,7 +61,7 @@ If you need to have access to the full AWT support, you need more than just `lib
[source, dockerfile]
----
# First stage - install the dependencies in an intermediate container
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 as BUILD
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6 as BUILD
RUN microdnf install freetype fontconfig
# Second stage - copy the dependencies
Expand Down Expand Up @@ -112,7 +112,7 @@ To use this base image, use the following `Dockerfile`:

[source, dockerfile]
----
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void testImageWithJava11() {
Path path = getPath("openjdk-11-runtime");
var result = sut.determine(path);
assertThat(result).hasValueSatisfying(v -> {
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/openjdk-11-runtime:1.10");
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/openjdk-11-runtime:1.14");
assertThat(v.getJavaVersion()).isEqualTo(11);
});
}
Expand All @@ -26,7 +26,7 @@ void testImageWithJava17() {
Path path = getPath("openjdk-17-runtime");
var result = sut.determine(path);
assertThat(result).hasValueSatisfying(v -> {
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/openjdk-17-runtime");
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/openjdk-17-runtime:1.14");
assertThat(v.getJavaVersion()).isEqualTo(17);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void testImageWithJava11() {
Path path = getPath("ubi-java11");
var result = sut.determine(path);
assertThat(result).hasValueSatisfying(v -> {
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/ubi-minimal:8.3");
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/ubi-minimal:8.6");
assertThat(v.getJavaVersion()).isEqualTo(11);
});
}
Expand All @@ -26,7 +26,7 @@ void testImageWithJava17() {
Path path = getPath("ubi-java17");
var result = sut.determine(path);
assertThat(result).hasValueSatisfying(v -> {
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/ubi-minimal");
assertThat(v.getBaseImage()).isEqualTo("registry.access.redhat.com/ubi8/ubi-minimal:8.6");
assertThat(v.getJavaVersion()).isEqualTo(17);
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/openjdk-11-runtime:1.10
FROM registry.access.redhat.com/ubi8/openjdk-11-runtime:1.14

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use Java 17 base image
FROM registry.access.redhat.com/ubi8/openjdk-17-runtime
FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.14

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-17-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class JibConfig {
/**
* The base image to be used when a container image is being produced for the jar build.
*
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17-runtime:1.11}
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17-runtime:1.14}
* is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11-runtime:1.11} is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11-runtime:1.14} is used as the default.
*/
@ConfigItem
public Optional<String> baseJvmImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public class JibProcessor {
private static final IsClassPredicate IS_CLASS_PREDICATE = new IsClassPredicate();
private static final String BINARY_NAME_IN_CONTAINER = "application";

private static final String JAVA_17_BASE_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.11";
private static final String JAVA_11_BASE_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11-runtime:1.11";
private static final String JAVA_17_BASE_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.14";
private static final String JAVA_11_BASE_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11-runtime:1.14";
private static final String DEFAULT_BASE_IMAGE_USER = "185";

private static final String OPENTELEMETRY_CONTEXT_CONTEXT_STORAGE_PROVIDER_SYS_PROP = "io.opentelemetry.context.contextStorageProvider";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
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_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11:1.14";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17:1.14";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

Expand Down Expand Up @@ -42,9 +42,9 @@ public static String getDefaultJvmImage(CompiledJavaVersionBuildItem.JavaVersion
/**
* The base image to be used when a container image is being produced for the jar build.
*
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17:1.11}
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17:1.14}
* is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11:1.11} is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11:1.14} is used as the default.
*/
@ConfigItem
public Optional<String> baseJvmImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
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_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11:1.14";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17:1.14";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

Expand Down Expand Up @@ -41,9 +41,9 @@ public static String getDefaultJvmImage(CompiledJavaVersionBuildItem.JavaVersion
/**
* The base image to be used when a container image is being produced for the jar build.
*
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17:1.11}
* When the application is built against Java 17 or higher, {@code registry.access.redhat.com/ubi8/openjdk-17:1.14}
* is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11:1.11} is used as the default.
* Otherwise {@code registry.access.redhat.com/ubi8/openjdk-11:1.14} is used as the default.
*/
@ConfigItem
public Optional<String> baseJvmImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
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_JVM_JDK11_IMAGE = "registry.access.redhat.com/ubi8/openjdk-11:1.14";
public static final String DEFAULT_BASE_JVM_JDK17_IMAGE = "registry.access.redhat.com/ubi8/openjdk-17:1.14";
public static final String DEFAULT_BASE_NATIVE_IMAGE = "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
public static final String DEFAULT_NATIVE_TARGET_FILENAME = "application";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-{java.version}:1.11
FROM registry.access.redhat.com/ubi8/openjdk-{java.version}:1.14

ENV LANGUAGE='en_US:en'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ language:
data:
dockerfile:
native:
from: registry.access.redhat.com/ubi8/ubi-minimal:8.5
from: registry.access.redhat.com/ubi8/ubi-minimal:8.6
native-micro:
from: quay.io/quarkus/quarkus-micro-image:1.0
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,13 @@ private void checkDockerfilesWithMaven(Path projectDir) {
assertThat(projectDir.resolve("src/main/docker/Dockerfile.jvm")).exists()
.satisfies(checkContains("./mvnw package"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.jvm"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/openjdk-11:1.11"))//TODO: make a teste to java17
.satisfies(checkContains("registry.access.redhat.com/ubi8/openjdk-11:1.14"))//TODO: make a teste to java17
.satisfies(checkContains("ENV JAVA_APP_JAR=\"/deployments/quarkus-run.jar\""))
.satisfies(checkNotContains("ENTRYPOINT"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.legacy-jar")).exists()
.satisfies(checkContains("./mvnw package -Dquarkus.package.type=legacy-jar"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.legacy-jar"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/openjdk-11:1.11"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/openjdk-11:1.14"))
.satisfies(checkContains("EXPOSE 8080"))
.satisfies(checkContains("USER 185"))
.satisfies(checkContains("ENV JAVA_APP_JAR=\"/deployments/quarkus-run.jar\""))
Expand All @@ -323,13 +323,13 @@ private void checkDockerfilesWithGradle(Path projectDir) {
assertThat(projectDir.resolve("src/main/docker/Dockerfile.jvm")).exists()
.satisfies(checkContains("./gradlew build"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.jvm"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.4"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.6"))
.satisfies(checkContains("ARG JAVA_PACKAGE=java-11-openjdk-headless"))
.satisfies(checkContains("ENTRYPOINT [ \"/deployments/run-java.sh\" ]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.legacy-jar")).exists()
.satisfies(checkContains("./gradlew build -Dquarkus.package.type=legacy-jar"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.legacy-jar"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.4"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.6"))
.satisfies(checkContains("ARG JAVA_PACKAGE=java-11-openjdk-headless"))
.satisfies(checkContains("ENTRYPOINT [ \"/deployments/run-java.sh\" ]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.native-micro")).exists()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down

0 comments on commit 79cf3da

Please sign in to comment.