-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (27 loc) · 871 Bytes
/
Dockerfile
File metadata and controls
31 lines (27 loc) · 871 Bytes
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
FROM project31/aarch64-centos:7
# Upgrade system, install wget and tar
RUN yum -y update && yum clean all \
&& yum -y upgrade \
&& yum -y install wget \
&& yum -y install tar \
&& yum -y install make \
&& yum -y install gcc \
&& yum -y install pcre-devel
# Build HAProxy from source
RUN mkdir -p /usr/local/haproxy
COPY ./haproxy.tar.gz /usr/local/haproxy
RUN tar -xvf /usr/local/haproxy/haproxy.tar.gz -C /usr/local/haproxy --strip-components=1 \
&& make_opts=' \
TARGET=custom \
USE_PCRE=1 \
USE_LIBCRYPT=1 \
USE_LINUX_SPLICE=1 \
USE_LINUX_TPROXY=1 \
' \
&& cd /usr/local/haproxy \
&& make $make_opts \
&& rm haproxy.tar.gz
# Copy configuration file
WORKDIR /usr/local/haproxy
COPY haproxy.cfg /usr/local/haproxy/haproxy.cfg
CMD ["./haproxy", "-f", "/usr/local/haproxy/haproxy.cfg"]