1 FROM haproxy:1.7.10-alpine
3 # For building the image in a proxy environment if necessary
7 ENV HTTP_PROXY ${HTTP_PROXY}
8 ENV HTTPS_PROXY ${HTTPS_PROXY}
9 ENV http_proxy ${HTTP_PROXY}
10 ENV https_proxy ${HTTPS_PROXY}
12 RUN apk add --no-cache \
18 groupadd haproxy -g 1000 && \
19 adduser -u 1000 -S -D -G haproxy -s /bin/bash haproxy && \
20 chown -R haproxy:haproxy /usr/local/etc/haproxy
22 RUN mkdir -p /etc/ssl/certs/ && mkdir -p /etc/ssl/private
24 COPY --chown=haproxy aai.pem /etc/ssl/private/aai.pem
25 COPY --chown=haproxy docker-entrypoint.sh /docker-entrypoint.sh
26 COPY --chown=haproxy resolvers.conf /usr/local/etc/haproxy/resolvers.conf
27 COPY --chown=haproxy haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
29 RUN chmod +x /docker-entrypoint.sh
32 ENTRYPOINT [ "/docker-entrypoint.sh" ]
33 CMD [ "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg", "-f", "/usr/local/etc/haproxy/resolvers.conf" ]