Skip to content

Commit

Permalink
chore(dockerfile): various Dockerfile cleanups (#4795)
Browse files Browse the repository at this point in the history
* chore(dockerfile): delete the (unused) java8 dockerfiles

* chore(dockerfile): replace deprecated MAINTAINER with LABEL

* chore(dockerfile): use gid/uid 10111 for the spinnaker user

* chore(dockerfile): make docker builds more cacheable
  • Loading branch information
plumpy committed Aug 12, 2020
1 parent 68748e1 commit 7fa9cd6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 72 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.compile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RUN apt-get update && apt-get install -y \
openjdk-8-jdk \
openjdk-11-jdk \
&& rm -rf /var/lib/apt/lists/*
MAINTAINER sig-platform@spinnaker.io
LABEL maintainer="sig-platform@spinnaker.io"
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV JDK_18 /usr/lib/jvm/java-8-openjdk-amd64
ENV GRADLE_USER_HOME /workspace/.gradle
Expand Down
37 changes: 0 additions & 37 deletions Dockerfile.java8

This file was deleted.

7 changes: 4 additions & 3 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM alpine:3.11
MAINTAINER sig-platform@spinnaker.io
COPY clouddriver-web/build/install/clouddriver /opt/clouddriver
LABEL maintainer="sig-platform@spinnaker.io"

ENV KUBECTL_VERSION v1.17.6

Expand Down Expand Up @@ -29,8 +28,10 @@ ENV PATH "$PATH:/usr/local/bin/"

ENV PATH=$PATH:/opt/google-cloud-sdk/bin/

RUN adduser -D -S spinnaker
RUN addgroup -S -g 10111 spinnaker
RUN adduser -S -G spinnaker -u 10111 spinnaker

COPY clouddriver-web/build/install/clouddriver /opt/clouddriver
RUN mkdir -p /opt/clouddriver/plugins && chown -R spinnaker:nogroup /opt/clouddriver/plugins

USER spinnaker
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM ubuntu:bionic
MAINTAINER sig-platform@spinnaker.io
COPY clouddriver-web/build/install/clouddriver /opt/clouddriver
LABEL maintainer="sig-platform@spinnaker.io"

RUN apt-get update && apt-get install -y curl gnupg && \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
Expand All @@ -22,7 +21,8 @@ RUN curl -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-
chmod +x /usr/local/bin/aws-iam-authenticator && \
ln -s /usr/local/bin/aws-iam-authenticator /usr/local/bin/heptio-authenticator-aws

RUN adduser --disabled-login --system spinnaker
RUN adduser --system --uid 10111 --group spinnaker
COPY clouddriver-web/build/install/clouddriver /opt/clouddriver
RUN mkdir -p /opt/clouddriver/plugins && chown -R spinnaker:nogroup /opt/clouddriver/plugins
USER spinnaker
CMD ["/opt/clouddriver/bin/clouddriver"]
28 changes: 0 additions & 28 deletions Dockerfile.ubuntu-java8

This file was deleted.

0 comments on commit 7fa9cd6

Please sign in to comment.