d771231e33c2ab4a7dd15d824461eac1ec56b090
[aai/aai-common.git] / Dockerfiles / haproxy / Dockerfile
1 FROM haproxy:1.7
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 ENV DEBIAN_FRONTEND=noninteractive
10
11 RUN if [ ! -z ${HTTP_PROXY} ]; \
12     then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; \
13     fi && \
14     if [ ! -z ${HTTP_PROXY} ]; \
15     then echo "Acquire::https::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; \
16     fi && \
17     apt-get update && \
18     apt-get -y install ca-certificates openssl curl && \
19     rm -rf /var/lib/apt/lists/*
20
21 RUN mkdir -p /etc/ssl/certs/ && mkdir -p /etc/ssl/private
22
23 COPY aai.pem /etc/ssl/private/aai.pem
24 COPY docker-entrypoint.sh /docker-entrypoint.sh
25 COPY resolvers.conf /usr/local/etc/haproxy/resolvers.conf
26 COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
27
28 RUN chmod +x /docker-entrypoint.sh
29
30 EXPOSE 8443