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 \
30 && apk add --no-cache ${DEPS} \
31 # Get the dpkg to properly download and install that version compatible to install GOSU on the image
32 && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
33 # Downloads the gosu command based on the dpkg version and gosu version supplied
34 && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
35 # Use GPG to install the gosu application locally
36 && chmod +x /usr/local/bin/gosu