Skip to content

Commit

Permalink
chore(dockerfile): various Dockerfile cleanups (spinnaker#1304)
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 authored Aug 12, 2020
1 parent 78e4350 commit 9fc9087
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 apk add --update \
openjdk11 \
openjdk8 \
&& rm -rf /var/cache/apk
MAINTAINER sig-platform@spinnaker.io
LABEL maintainer="sig-platform@spinnaker.io"
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
ENV JDK_18 /usr/lib/jvm/java-1.8-openjdk
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 gate-web/build/install/gate /opt/gate
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 gate-web/build/install/gate /opt/gate
RUN mkdir -p /opt/gate/plugins && chown -R spinnaker:nogroup /opt/gate/plugins
USER spinnaker
CMD ["/opt/gate/bin/gate"]
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 gate-web/build/install/gate /opt/gate
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 gate-web/build/install/gate /opt/gate
RUN mkdir -p /opt/gate/plugins && chown -R spinnaker:nogroup /opt/gate/plugins
USER spinnaker
CMD ["/opt/gate/bin/gate"]
8 changes: 0 additions & 8 deletions Dockerfile.ubuntu-java8

This file was deleted.

0 comments on commit 9fc9087

Please sign in to comment.