diff --git a/amazoncorretto-11-debian/Dockerfile b/amazoncorretto-11-debian/Dockerfile index 793bc9bf..53923e0a 100644 --- a/amazoncorretto-11-debian/Dockerfile +++ b/amazoncorretto-11-debian/Dockerfile @@ -8,7 +8,6 @@ RUN apt-get update \ && export GNUPGHOME="$(mktemp -d)" \ && curl -fL https://apt.corretto.aws/corretto.key | gpg --batch --import \ && gpg --batch --export '6DC3636DAE534049C8B94623A122542AB04F24E3' > /usr/share/keyrings/corretto.gpg \ - && rm -r "$GNUPGHOME" \ && unset GNUPGHOME \ && echo "deb [signed-by=/usr/share/keyrings/corretto.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list \ && apt-get update \ @@ -16,6 +15,9 @@ RUN apt-get update \ && apt-get install -y java-11-amazon-corretto-jdk \ && rm -rf /var/lib/apt/lists/* +# set JAVA_HOME manually since nothing else will set it +ENV JAVA_HOME "/usr/lib/jvm/java-11-amazon-corretto" + # common for all images ENV MAVEN_HOME /usr/share/maven diff --git a/amazoncorretto-17-debian/Dockerfile b/amazoncorretto-17-debian/Dockerfile index 4d9c83cf..7e848035 100644 --- a/amazoncorretto-17-debian/Dockerfile +++ b/amazoncorretto-17-debian/Dockerfile @@ -8,7 +8,6 @@ RUN apt-get update \ && export GNUPGHOME="$(mktemp -d)" \ && curl -fL https://apt.corretto.aws/corretto.key | gpg --batch --import \ && gpg --batch --export '6DC3636DAE534049C8B94623A122542AB04F24E3' > /usr/share/keyrings/corretto.gpg \ - && rm -r "$GNUPGHOME" \ && unset GNUPGHOME \ && echo "deb [signed-by=/usr/share/keyrings/corretto.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list \ && apt-get update \ @@ -16,6 +15,9 @@ RUN apt-get update \ && apt-get install -y java-17-amazon-corretto-jdk \ && rm -rf /var/lib/apt/lists/* +# set JAVA_HOME manually since nothing else will set it +ENV JAVA_HOME "/usr/lib/jvm/java-17-amazon-corretto" + # common for all images ENV MAVEN_HOME /usr/share/maven diff --git a/amazoncorretto-21-debian/Dockerfile b/amazoncorretto-21-debian/Dockerfile index 7ae12991..d49b20a1 100644 --- a/amazoncorretto-21-debian/Dockerfile +++ b/amazoncorretto-21-debian/Dockerfile @@ -8,7 +8,6 @@ RUN apt-get update \ && export GNUPGHOME="$(mktemp -d)" \ && curl -fL https://apt.corretto.aws/corretto.key | gpg --batch --import \ && gpg --batch --export '6DC3636DAE534049C8B94623A122542AB04F24E3' > /usr/share/keyrings/corretto.gpg \ - && rm -r "$GNUPGHOME" \ && unset GNUPGHOME \ && echo "deb [signed-by=/usr/share/keyrings/corretto.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list \ && apt-get update \ @@ -16,6 +15,9 @@ RUN apt-get update \ && apt-get install -y java-21-amazon-corretto-jdk \ && rm -rf /var/lib/apt/lists/* +# set JAVA_HOME manually since nothing else will set it +ENV JAVA_HOME "/usr/lib/jvm/java-21-amazon-corretto" + # common for all images ENV MAVEN_HOME /usr/share/maven diff --git a/amazoncorretto-8-debian/Dockerfile b/amazoncorretto-8-debian/Dockerfile index 0aa07682..41cff342 100644 --- a/amazoncorretto-8-debian/Dockerfile +++ b/amazoncorretto-8-debian/Dockerfile @@ -8,7 +8,6 @@ RUN apt-get update \ && export GNUPGHOME="$(mktemp -d)" \ && curl -fL https://apt.corretto.aws/corretto.key | gpg --batch --import \ && gpg --batch --export '6DC3636DAE534049C8B94623A122542AB04F24E3' > /usr/share/keyrings/corretto.gpg \ - && rm -r "$GNUPGHOME" \ && unset GNUPGHOME \ && echo "deb [signed-by=/usr/share/keyrings/corretto.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list \ && apt-get update \ @@ -16,6 +15,9 @@ RUN apt-get update \ && apt-get install -y java-1.8.0-amazon-corretto-jdk \ && rm -rf /var/lib/apt/lists/* +# set JAVA_HOME manually since nothing else will set it +ENV JAVA_HOME "/usr/lib/jvm/java-1.8.0-amazon-corretto/jre" + # common for all images ENV MAVEN_HOME /usr/share/maven