-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile.main.in
executable file
·29 lines (24 loc) · 1.19 KB
/
Dockerfile.main.in
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
gcc make openssl-devel pcre-devel zlib-devel tar curl socat && \\
curl -sfSL "$HAPROXY_SRC_URL/$HAPROXY_BRANCH/src/haproxy-$HAPROXY_MINOR.tar.gz" -o haproxy.tar.gz && \\
echo "$HAPROXY_MD5 haproxy.tar.gz" | md5sum -c - && \\
useradd -l -u ${HAPROXY_UID} -r -G 0 -s /sbin/nologin -c "haproxy user" haproxy && \\
mkdir -p /tmp/haproxy && \\
tar -xzf haproxy.tar.gz -C /tmp/haproxy --strip-components=1 && \\
rm -f haproxy.tar.gz && \\
make -C /tmp/haproxy TARGET=linux2628 CPU=generic USE_PCRE=1 USE_REGPARM=1 USE_OPENSSL=1 \\
USE_ZLIB=1 USE_TFO=1 USE_LINUX_TPROXY=1 \\
all install-bin install-man && \\
ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy && \\
mkdir -p /var/lib/haproxy && \\
chown -R ${HAPROXY_UID}:0 /var/lib/haproxy && \\
chmod -R g+rw /var/lib/haproxy && \\
cp /tmp/haproxy/doc/haproxy.1 /help.1 && \\
rm -rf /tmp/haproxy && \\
yum -y autoremove gcc make && \\
yum clean all
ADD ./cfg_files/cli /usr/bin/cli
ADD ./cfg_files/haproxy.cfg /etc/haproxy/haproxy.cfg
COPY licenses /licenses
EXPOSE 8080 8443
USER 10001
CMD ["/usr/local/sbin/haproxy", "-f", "/etc/haproxy/haproxy.cfg"]