1cdd580f177282bc01784743ebc8e0db43b87327
[aai/aai-common.git] / aai-common-docker / aai-common-images / src / main / docker / Dockerfile.alpine
1 FROM adoptopenjdk/openjdk11:jre-11.0.9_11-alpine
2
3 # For building the image in a proxy environment if necessary
4 ARG HTTP_PROXY
5 ARG HTTPS_PROXY
6 ARG no_proxy
7
8 ENV HTTP_PROXY   ${HTTP_PROXY}
9 ENV HTTPS_PROXY  ${HTTPS_PROXY}
10 ENV http_proxy   ${HTTP_PROXY}
11 ENV https_proxy  ${HTTPS_PROXY}
12 ENV no_proxy  127.0.0.1,localhost,${no_proxy}
13
14 RUN \
15     # Put all the dependencies into this variable to easily install everything
16     DEPS="ca-certificates \
17             curl \
18             dpkg \
19             fastjar \
20             jq \
21             loksh \
22             bash \
23             netcat-openbsd \
24             openssl \
25             shadow \
26             util-linux \
27             wget" \
28         && apk add --no-cache ${DEPS} \
29         # need fastjar for some projects to update app's jar on container restart
30         && ln -snf /usr/bin/fastjar $JAVA_HOME/bin/jar \
31         && mkdir -p /opt/aaihome/aaiadmin && \
32         groupadd aaiadmin -g 1000 && \
33         useradd --shell=/bin/bash -u 1000 -g 1000 -o -c "" -m aaiadmin
34
35 # Reset the proxy after done with it download necessary dependencies
36
37 ENV HTTP_PROXY  ""
38 ENV HTTPS_PROXY ""
39 ENV http_proxy  ""
40 ENV https_proxy ""
41 ENV no_proxy ""
42
43 USER aaiadmin