Update alpine images for jdk11 97/112497/2 2.1.1
authorJim Hahn <jrh3@att.com>
Thu, 10 Sep 2020 14:46:21 +0000 (10:46 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 14 Sep 2020 15:55:29 +0000 (11:55 -0400)
Updated the docker images to alpine 3.12.0 so that a newer version of
openjdk11 would be pulled in.
Modified the jdk image to download maven via curl rather than installing
it via apk so-as to prevent it from installing java8 as a dependency.

Issue-ID: POLICY-2819
Change-Id: Iba4e2448b826ce6abb5df506228c99b9a3676495
Signed-off-by: Jim Hahn <jrh3@att.com>
policy-jdk/alpine/src/main/docker/Dockerfile
policy-jre/alpine/src/main/docker/Dockerfile

index 9e1b841..76dc97e 100644 (file)
@@ -23,7 +23,7 @@
 # $JAVA_HOME is set to /usr/lib/jvm/java-11-openjdk
 # more details at https://hub.docker.com/_/openjdk
 
-FROM alpine:3.11.3
+FROM alpine:3.12.0
 
 LABEL maintainer="Policy Team"
 
@@ -45,13 +45,15 @@ RUN apk update \
         procps \
         unzip \
         wget \
-        zip
-
-RUN apk add --no-cache \
-        maven
-
-RUN apk add --no-cache \
+        zip \
         openjdk11 \
+    && curl --fail --silent --show-error --retry 3 \
+            --output /tmp/apache-maven-3.6.3-bin.tar.gz \
+            https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \
+    && tar zxC /usr/share </tmp/apache-maven-3.6.3-bin.tar.gz \
+    && chown -R root:root /usr/share/apache-maven-3.6.3 \
+    && ln -s /usr/share/apache-maven-3.6.3/bin/mvn /usr/bin/mvn \
+    && rm -f /tmp/apache-maven-3.6.3-bin.tar.gz \
     && addgroup -S policy \
     && adduser -S  --shell /bin/bash -G policy policy \
     && mkdir -p ${POLICY_HOME}/ \
index 5d986f1..8fd9710 100644 (file)
@@ -23,7 +23,7 @@
 # $JAVA_HOME is set to /usr/lib/jvm/java-11-openjdk
 # more details at https://hub.docker.com/_/openjdk
 
-FROM alpine:3.11.3
+FROM alpine:3.12.0
 
 LABEL maintainer="Policy Team"
 
@@ -45,9 +45,7 @@ RUN apk update \
         procps \
         unzip \
         wget \
-        zip
-
-RUN apk add --no-cache \
+        zip \
         openjdk11-jre \
     && addgroup -S policy \
     && adduser -S  --shell /bin/bash -G policy policy \