From 4cc3c0b0301a1f74b5d9da073ae61c3961fe8807 Mon Sep 17 00:00:00 2001 From: Michael Plump Date: Sun, 16 Feb 2020 02:18:43 -0500 Subject: [PATCH 1/2] chore(build): Update Dockerfiles for new cloudbuild configs See spinnaker/buildtool#14 --- Dockerfile.compile | 18 ++++++++++++------ Dockerfile.java8 | 4 ++-- Dockerfile.slim | 4 ++-- Dockerfile.ubuntu | 4 ++-- Dockerfile.ubuntu-java8 | 6 +++--- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Dockerfile.compile b/Dockerfile.compile index 98c4b2a77..7291f69d8 100644 --- a/Dockerfile.compile +++ b/Dockerfile.compile @@ -1,6 +1,12 @@ -FROM gcr.io/spinnaker-marketplace/gradle_cache -MAINTAINER delivery-engineering@netflix.com -ENV GRADLE_USER_HOME /gradle_cache/.gradle -COPY . compiled_sources -WORKDIR compiled_sources -RUN ./gradlew --no-daemon clean igor-web:installDist -x test +FROM ubuntu:eoan +MAINTAINER sig-platform@spinnaker.io + +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get install -y \ + openjdk-8-jdk-headless \ + && apt-get clean + +ENV GRADLE_USER_HOME /workspace/.gradle +ENV GRADLE_OPTS -Xmx2048m +CMD ./gradlew --no-daemon igor-web:installDist -x test diff --git a/Dockerfile.java8 b/Dockerfile.java8 index 9564a6c67..136d61a70 100644 --- a/Dockerfile.java8 +++ b/Dockerfile.java8 @@ -1,6 +1,6 @@ FROM alpine:3.11 -MAINTAINER delivery-engineering@netflix.com -COPY --from=compile /compiled_sources/igor-web/build/install/igor /opt/igor +MAINTAINER sig-platform@spinnaker.io +COPY igor-web/build/install/igor /opt/igor RUN apk --no-cache add --update bash openjdk8-jre RUN adduser -D -S spinnaker USER spinnaker diff --git a/Dockerfile.slim b/Dockerfile.slim index 3d56b4556..9220fd287 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -1,6 +1,6 @@ FROM alpine:3.11 -MAINTAINER delivery-engineering@netflix.com -COPY --from=compile /compiled_sources/igor-web/build/install/igor /opt/igor +MAINTAINER sig-platform@spinnaker.io +COPY igor-web/build/install/igor /opt/igor RUN apk --no-cache add --update bash openjdk11-jre RUN adduser -D -S spinnaker USER spinnaker diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 394bd576b..face13a75 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -1,6 +1,6 @@ FROM ubuntu:bionic -MAINTAINER delivery-engineering@netflix.com -COPY --from=compile /compiled_sources/igor-web/build/install/igor /opt/igor +MAINTAINER sig-platform@spinnaker.io +COPY igor-web/build/install/igor /opt/igor RUN apt-get update && apt-get -y install openjdk-11-jre-headless wget RUN adduser --disabled-login --system spinnaker USER spinnaker diff --git a/Dockerfile.ubuntu-java8 b/Dockerfile.ubuntu-java8 index 33075d090..0101d0f49 100644 --- a/Dockerfile.ubuntu-java8 +++ b/Dockerfile.ubuntu-java8 @@ -1,7 +1,7 @@ FROM ubuntu:bionic -MAINTAINER delivery-engineering@netflix.com -COPY --from=compile /compiled_sources/igor-web/build/install/igor /opt/igor +MAINTAINER sig-platform@spinnaker.io +COPY igor-web/build/install/igor /opt/igor RUN apt-get update && apt-get -y install openjdk-8-jre-headless wget RUN adduser --disabled-login --system spinnaker USER spinnaker -CMD ["/opt/igor/bin/igor"] \ No newline at end of file +CMD ["/opt/igor/bin/igor"] From 9ecc53ddc4bf998099d5bf2d588be0238a17340f Mon Sep 17 00:00:00 2001 From: Michael Plump Date: Wed, 19 Feb 2020 14:21:38 -0500 Subject: [PATCH 2/2] chore(dockerfile): use openjdk:8 instead of rolling our own --- Dockerfile.compile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Dockerfile.compile b/Dockerfile.compile index 7291f69d8..b1d27d684 100644 --- a/Dockerfile.compile +++ b/Dockerfile.compile @@ -1,12 +1,5 @@ -FROM ubuntu:eoan +FROM openjdk:8 MAINTAINER sig-platform@spinnaker.io - -RUN apt-get update \ - && apt-get -y upgrade \ - && apt-get install -y \ - openjdk-8-jdk-headless \ - && apt-get clean - ENV GRADLE_USER_HOME /workspace/.gradle ENV GRADLE_OPTS -Xmx2048m CMD ./gradlew --no-daemon igor-web:installDist -x test