forked from ianblenke/tutum-docker-clusterproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (37 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
50 lines (37 loc) · 1.38 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM impulsecloud/ic-ubuntu:latest
# Forked from tutum/haproxy
MAINTAINER Johann du Toit <johann@impulsecloud.com.au>
# 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.0 && \
rm -rf /var/lib/apt/lists/*
# the rsyslog destination to where haproxy logs are sent
ENV RSYSLOG_DESTINATION 127.0.0.1
# MODE of operation (http, tcp)
ENV MODE http
# algorithm for load balancing (roundrobin, source, leastconn, ...)
ENV BALANCE roundrobin
# maximum number of connections
ENV MAXCONN 4096
# list of options separated by commas
ENV OPTION redispatch, httplog, dontlognull, forwardfor
# list of timeout entries separated by commas
ENV TIMEOUT connect 5000, client 50000, server 50000
# Stats port
ENV STATS_PORT 1936
# Stats authentication
ENV STATS_AUTH stats:stats
# SSL certificate to use (optional)
ENV SSL_CERT **None**
# SSL bind options to use (optional)
ENV SSL_BIND_OPTIONS no-sslv3
# Add scripts
ADD /haproxy /haproxy
ADD run.sh /
EXPOSE 80 443 1936
CMD ["/run.sh"]