Created maven modules for aai-common docker images.
[aai/aai-common.git] / aai-common-docker / aai-common-images / src / main / docker / Dockerfile.alpine
1 FROM openjdk:8-jre-alpine3.9
2
3 # Set the version of the gosu command and if needs to be, it can be modified at runtime
4 ENV GOSU_VERSION 1.10
5
6 # For building the image in a proxy environment if necessary
7 ARG HTTP_PROXY
8 ARG HTTPS_PROXY
9 ARG no_proxy
10
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}
16
17 RUN \
18     # Put all the dependencies into this variable to easily install everything
19     DEPS="ca-certificates \
20             curl \
21             dpkg \
22             fastjar \
23             jq \
24             loksh \
25             bash \
26             netcat-openbsd \
27             openssl \
28             shadow \
29             util-linux \
30             wget" \
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