forked from ianblenke/tutum-docker-clusterproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (29 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM ubuntu:trusty
MAINTAINER Feng Honglin <[email protected]>
# Install pip and haproxy
RUN echo 'deb http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu trusty main' >> /etc/apt/sources.list && \
echo 'deb-src http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu trusty main' >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 505D97A41C61B9CD && \
apt-get update && \
apt-get install -y --no-install-recommends haproxy python-pip && \
apt-get clean && \
pip install python-tutum==0.16.21 && \
rm -rf /var/lib/apt/lists/* && \
echo '#!/bin/sh' > /reload.sh && \
echo 'kill -USR1 $(cat /tmp/tutum-haproxy.pid)' >> /reload.sh && \
chmod +x /reload.sh
ENV RSYSLOG_DESTINATION=127.0.0.1 \
MODE=http \
BALANCE=roundrobin \
MAXCONN=4096 \
OPTION="redispatch, httplog, dontlognull, forwardfor" \
TIMEOUT="connect 5000, client 50000, server 50000" \
STATS_PORT=1936 \
STATS_AUTH="stats:stats" \
SSL_BIND_OPTIONS=no-sslv3 \
SSL_BIND_CIPHERS="ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:DHE-DSS-AES128-SHA:DES-CBC3-SHA" \
HEALTH_CHECK="check"
# Add scripts
ADD haproxy /haproxy
EXPOSE 80 443 1936
CMD ["python", "/haproxy/main.py"]