Update haproxy to use static alpine tag
[aai/aai-common.git] / aai-common-docker / aai-haproxy-image / src / main / docker / Dockerfile
1 FROM haproxy:1.7.10-alpine
2
3 # Set up your corporate proxy if there is
4 ENV HTTP_PROXY  ""
5 ENV HTTPS_PROXY  ""
6 ENV http_proxy  ""
7 ENV https_proxy  ""
8
9 RUN apk add --no-cache \
10     ca-certificates \
11     curl \
12     openssl \
13     shadow \
14     util-linux && \
15     groupadd haproxy -g 1000 && \
16     adduser -u 1000 -S -D -G haproxy -s /bin/bash haproxy && \
17     chown -R haproxy:haproxy /usr/local/etc/haproxy
18
19 RUN mkdir -p /etc/ssl/certs/ && mkdir -p /etc/ssl/private
20
21 COPY --chown=haproxy aai.pem /etc/ssl/private/aai.pem
22 COPY --chown=haproxy docker-entrypoint.sh /docker-entrypoint.sh
23 COPY --chown=haproxy resolvers.conf /usr/local/etc/haproxy/resolvers.conf
24 COPY --chown=haproxy haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
25
26 RUN chmod +x /docker-entrypoint.sh
27 USER haproxy
28
29 ENTRYPOINT [ "/docker-entrypoint.sh" ]
30 CMD [ "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg", "-f", "/usr/local/etc/haproxy/resolvers.conf" ] 
31 EXPOSE 8443