5

JDK17用什么docker基础镜像?

 2 years ago
source link: https://www.jdon.com/59463
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JDK17用什么docker基础镜像?

试图从JDK 8移植到17,需要更新应用构建基础设施,以前运行的是openjdk:8u322-jdk,现在试图把它升级到openjdk:17.0.2-jdk,除此之外还有什么JDK基础镜像?

  • 如果可以使用除了java二进制文件之外没有任何其他内容的容器,推荐gcr.io/distroless/java17:nonroot
  • 如果您想使用非 JDK 基础镜像,您可以轻松地从任何其他镜像复制 JDK,如下所示:
FROM registry.access.redhat.com/ubi8-minimal:8.4

ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:17 $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
  • openjdk:17.0.2-slim-buster 用于 docker compose
  • Azul Zulu 17

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK