Skip to content

Commit

Permalink
chore(dockerfile): various Dockerfile cleanups (#833)
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 3a9c65a commit 24ed5d4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 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
8 changes: 0 additions & 8 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,8 +1,9 @@
FROM alpine:3.11
MAINTAINER sig-platform@spinnaker.io
COPY igor-web/build/install/igor /opt/igor
LABEL maintainer="sig-platform@spinnaker.io"
RUN apk --no-cache add --update bash openjdk11-jre
RUN adduser -D -S spinnaker
RUN addgroup -S -g 10111 spinnaker
RUN adduser -S -G spinnaker -u 10111 spinnaker
COPY igor-web/build/install/igor /opt/igor
RUN mkdir -p /opt/igor/plugins && chown -R spinnaker:nogroup /opt/igor/plugins
USER spinnaker
CMD ["/opt/igor/bin/igor"]
6 changes: 3 additions & 3 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:bionic
MAINTAINER sig-platform@spinnaker.io
COPY igor-web/build/install/igor /opt/igor
LABEL maintainer="sig-platform@spinnaker.io"
RUN apt-get update && apt-get -y install openjdk-11-jre-headless wget
RUN adduser --disabled-login --system spinnaker
RUN adduser --system --uid 10111 --group spinnaker
COPY igor-web/build/install/igor /opt/igor
RUN mkdir -p /opt/igor/plugins && chown -R spinnaker:nogroup /opt/igor/plugins
USER spinnaker
CMD ["/opt/igor/bin/igor"]
8 changes: 0 additions & 8 deletions Dockerfile.ubuntu-java8

This file was deleted.

0 comments on commit 24ed5d4

Please sign in to comment.