AdoptOpenJDK / openjdk-docker

Scripts for creating Docker images of OpenJDK binaries.
https://hub.docker.com/_/adoptopenjdk/
Apache License 2.0
426 stars 237 forks source link

Add Support for Multiple Docker Base Images on Official DockerHub #236

Open james-crowley opened 4 years ago

james-crowley commented 4 years ago

With testing for other base images right around the corner, https://github.com/AdoptOpenJDK/openjdk-tests/issues/1109, I wanted to make sure all correct base images made it into the testing pipeline. Thus allowing the new base images to get tested and pushed up to the official DockerHub repository, https://hub.docker.com/_/adoptopenjdk.

Currently the only base images in the official DockerHub repository are:

The unofficial DockerHub repositories currently support:

It would be nice to start moving some of the base images in the unofficial DockerHub repositories to the official repository after testing has been completed.

In addition it would be nice to add support for the following additional base images:

Some other improvements that should be made while adding more base images/tags are:

@dinogun @smlambert

karianna commented 4 years ago

@dinogun - do you have a clear view of what's left on this request? I'm wondering if we should split it out.

james-crowley commented 4 years ago

@karianna Was interested in the status of this as well. I see some great progress on adding support for more base images but I am trying to figure out what is left to accomplish this. I'll try to sync up with @dinogun internally.

james-crowley commented 4 years ago

@nealef Were planning on using ClefOS as one of the base images. Anything you think we should watch out for? Any gotchas when it comes to packages needed to get Adopt working?

nealef commented 4 years ago

No. I've built images for 8 and 11 without any problems.

-------- Original message -------- From: Jim Crowley notifications@github.com Date: 12/6/19 03:40 (GMT+10:00) To: AdoptOpenJDK/openjdk-docker openjdk-docker@noreply.github.com Cc: Neale Ferguson neale@sinenomine.net, Mention mention@noreply.github.com Subject: Re: [AdoptOpenJDK/openjdk-docker] Add Support for Multiple Docker Base Images on Official DockerHub (#236)

@nealefhttps://github.com/nealef Were planning on using ClefOS as one of the base images. Anything you think we should watch out for? Any gotchas when it comes to packages needed to get Adopt working?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/AdoptOpenJDK/openjdk-docker/issues/236?email_source=notifications&email_token=AACLN6WGYCRVTF5MBTV7X6TQXEVIHA5CNFSM4JBCZY2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGBKOMA#issuecomment-562210608, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACLN6QOER3PHCMV452KKTDQXEVIHANCNFSM4JBCZY2A.

nealef commented 4 years ago

There was one issue that was still open for AdoptJDK on Z:

https://github.com/AdoptOpenJDK/openjdk-build/issues/1310

Also, here is the Docker file I was using for Z:

FROM            docker.io/clefos/clefos:latest

MAINTAINER      "The ClefOS Project" <neale@sinenomine.net>

LABEL           Vendor="ClefOS" License="ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C"
LABEL           Version=11

RUN             yum update --setopt=tsflags=nodocs -y && \
                yum install --setopt=tsflags=nodocs -y tar

RUN             curl -s -L 'https://api.adoptopenjdk.net/v2/binary/releases/openjdk11?openjdk_impl=openj9&os=linux&arch=s390x&release=latest&type=jdk' -o /tmp/openjdk.tar.gz && \
                mkdir -p /usr/lib/jvm/java-11-openjdk && \
                tar -C /usr/lib/jvm/java-11-openjdk -xzf /tmp/openjdk.tar.gz --strip-components=1 && \
                ln -sf /usr/lib/jvm/java-11-openjdk /usr/lib/jvm/java && \
                rm -f /tmp/openjdk.tar.gz && \
                yum clean all && \
                rm -rf /var/cache/yum/* /tmp/* /var/log/yum.log

ENV             JAVA_HOME=/usr/lib/jvm/java
ENV             PATH=$PATH:$JAVA_HOME/bin
james-crowley commented 4 years ago

Here is the ClefOS Dockerfile that was generated via my testing. Note I was only testing hotspot at the time:

FROM clefos:7

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

RUN yum install -y openssl curl ca-certificates fontconfig gzip locales tar \
    && yum update; yum clean all

ENV JAVA_VERSION jdk8u232-b09

RUN set -eux; \
    ARCH="$(uname -m)"; \
    case "${ARCH}" in \
       aarch64|arm64) \
         ESUM='35799a2fd4b467115aff1bc3a54853b5131ba9068e53e1ab0fbe5521a3f2ba83'; \
         BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz'; \
         ;; \
       armhf) \
         ESUM='fdd9f61f1b2df74242da54ee3b3231b0123782a917e9673351276da439c7cab1'; \
         BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz'; \
         ;; \
       ppc64el|ppc64le) \
         ESUM='da87bdc04b47477b42afc76066dbd96efa35ad967238be03a0081f8840e893a8'; \
         BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u232b09.tar.gz'; \
         ;; \
       s390x) \
         ESUM='bd20cb8bf4cfab9d3e2b2ccfb9a6f9eda1e4e67b4103b9975d29de12c05ad1f5'; \
         BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_s390x_linux_hotspot_8u232b09.tar.gz'; \
         ;; \
       amd64|x86_64) \
         ESUM='7b7884f2eb2ba2d47f4c0bf3bb1a2a95b73a3a7734bd47ebf9798483a7bcc423'; \
         BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz'; \
         ;; \
       *) \
         echo "Unsupported arch: ${ARCH}"; \
         exit 1; \
         ;; \
    esac; \
    curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
    echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
    mkdir -p /opt/java/openjdk; \
    cd /opt/java/openjdk; \
    tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
    rm -rf /tmp/openjdk.tar.gz;

ENV JAVA_HOME=/opt/java/openjdk \
    PATH="/opt/java/openjdk/bin:$PATH"

@nealef pretty similar to yours. I'll try to follow up with the error you were running into and see if we can get someone to look into more.