1 FROM openjdk:8-jre-alpine3.9
3 # Set the version of the gosu command and if needs to be, it can be modified at runtime
6 # For building the image in a proxy environment if necessary
11 ENV HTTP_PROXY ${HTTP_PROXY}
12 ENV HTTPS_PROXY ${HTTPS_PROXY}
13 ENV http_proxy ${HTTP_PROXY}
14 ENV https_proxy ${HTTPS_PROXY}
15 ENV no_proxy 127.0.0.1,localhost,${no_proxy}
18 # Put all the dependencies into this variable to easily install everything
19 DEPS="ca-certificates \
31 && apk add --no-cache ${DEPS} \
32 # need fastjar for some projects to update app's jar on container restart
33 && ln -snf /usr/bin/fastjar $JAVA_HOME/bin/jar \
34 # Get the dpkg to properly download and install that version compatible to install GOSU on the image
35 && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
36 # Downloads the gosu command based on the dpkg version and gosu version supplied
37 && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
38 # Use GPG to install the gosu application locally
39 && chmod +x /usr/local/bin/gosu