-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.debian
65 lines (56 loc) · 2.25 KB
/
Dockerfile.debian
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM debian:jessie
# no rpms for socklog available
# FROM centos:latest
# FROM registry.access.redhat.com/rhel7:latest
RUN apt-get -y update \
&& DEBIAN_FRONTEND="noninteractive" \
apt-get -y install libpcre3 libssl1.0.0 zlib1g socklog-run libreadline6
# take a look at http://www.lua.org/download.html for
# newer version
ENV HAPROXY_MAJOR 1.6
ENV HAPROXY_VERSION 1.6.3
ENV HAPROXY_MD5 3362d1e268c78155c2474cb73e7f03f9
ENV LUA_URL http://www.lua.org/ftp/lua-5.3.1.tar.gz
ENV LUA_MD5 797adacada8d85761c079390ff1d9961
# see http://git.haproxy.org/?p=haproxy-1.6.git;a=blob_plain;f=Makefile;hb=HEAD
# for some helpful navigation of the possible "make" arguments
RUN buildDeps='libpcre3-dev libssl-dev gcc make zlib1g-dev tar libreadline6-dev' \
&& set -x \
&& DEBIAN_FRONTEND="noninteractive" \
apt-get -y install curl $buildDeps
RUN curl -SL ${LUA_URL} -o lua-5.3.1.tar.gz \
&& echo "${LUA_MD5} lua-5.3.1.tar.gz" | md5sum -c \
&& mkdir -p /usr/src/lua \
&& tar -xzf lua-5.3.1.tar.gz -C /usr/src/lua --strip-components=1 \
&& rm lua-5.3.1.tar.gz \
&& make -C /usr/src/lua linux test install \
&& curl -SL "http://www.haproxy.org/download/${HAPROXY_MAJOR}/src/haproxy-${HAPROXY_VERSION}.tar.gz" -o haproxy.tar.gz \
&& echo "${HAPROXY_MD5} haproxy.tar.gz" | md5sum -c \
&& mkdir -p /usr/src/haproxy \
&& tar -xzf haproxy.tar.gz -C /usr/src/haproxy --strip-components=1 \
&& rm haproxy.tar.gz \
&& make -C /usr/src/haproxy \
TARGET=linux2628 \
USE_PCRE=1 \
USE_OPENSSL=1 \
USE_ZLIB=1 \
USE_LINUX_SPLICE=1 \
USE_TFO=1 \
USE_PCRE_JIT=1 \
USE_LUA=1 \
all \
install-bin \
&& mkdir -p /usr/local/etc/haproxy \
&& mkdir -p /usr/local/etc/haproxy/ssl \
&& mkdir -p /usr/local/etc/haproxy/ssl/cas \
&& mkdir -p /usr/local/etc/haproxy/ssl/crts \
&& cp -R /usr/src/haproxy/examples/errorfiles /usr/local/etc/haproxy/errors \
&& rm -rf /usr/src/haproxy /usr/src/lua \
&& apt-get -y autoremove \
&& apt-get -y clean all \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# && openssl dhparam -out /usr/local/etc/haproxy/ssl/dh-param_4096 4096 \
COPY haproxy.conf /usr/local/etc/haproxy/haproxy.cfg
COPY dh-param_4096 /usr/local/etc/haproxy/ssl/dh-param_4096
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
#CMD ["haproxy", "-vv"]