-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
62 lines (53 loc) · 2.12 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
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
# FROM centos:latest
FROM registry.access.redhat.com/rhel7:latest
# take a look at http://www.lua.org/download.html for
# newer version
ENV HAPROXY_MAJOR=1.6 \
HAPROXY_VERSION=1.6.8 \
HAPROXY_MD5=8cb3719013e7f34c6d689dabf8a8cd6e \
LUA_VERSION=5.3.3 \
LUA_URL=http://www.lua.org/ftp/lua-5.3.3.tar.gz \
LUA_MD5=703f75caa4fdf4a911c1a72e67a27498 \
buildDeps='pcre-devel openssl-devel gcc make zlib-devel readline-devel openssl tar'
# RUN cat /etc/redhat-release
# RUN yum provides "*lib*/libc.a"
# 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 set -x \
&& yum -y update \
&& yum -y install pcre openssl-libs zlib bind-utils curl socat ${buildDeps} \
&& curl -SL ${LUA_URL} -o lua-${LUA_VERSION}.tar.gz \
&& echo "${LUA_MD5} lua-${LUA_VERSION}.tar.gz" | md5sum -c \
&& mkdir -p /usr/src/lua \
&& tar -xzf lua-${LUA_VERSION}.tar.gz -C /usr/src/lua --strip-components=1 \
&& rm lua-${LUA_VERSION}.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 \
&& yum -y autoremove $buildDeps \
&& yum -y clean all
# && openssl dhparam -out /usr/local/etc/haproxy/ssl/dh-param_4096 4096 \
COPY containerfiles /
EXPOSE 13443/tcp
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.conf"]
#CMD ["haproxy", "-vv"]