-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (41 loc) · 1.63 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
FROM docker.io/library/debian:bookworm AS base
# This stage is mostly to import and unpack the dists in a docker-friendly fashion
FROM base AS dists
RUN apt -qq update && apt install -qq -y bzip2
WORKDIR /tmp/dataplaneapi
COPY ./deps/dataplaneapi/dataplaneapi-dist.tar.gz /tmp/dataplaneapi/dataplaneapi.tar.gz
RUN ls -alh && tar xf dataplaneapi.tar.gz
ARG HAPROXY_SSL_LIB="awslc"
WORKDIR /tmp/${HAPROXY_SSL_LIB}
COPY ./deps/${HAPROXY_SSL_LIB}/${HAPROXY_SSL_LIB}-dist.tar.gz /tmp/${HAPROXY_SSL_LIB}/${HAPROXY_SSL_LIB}.tar.gz
RUN ls -alh && tar xf ${HAPROXY_SSL_LIB}.tar.gz
WORKDIR /tmp/haproxy
COPY ./haproxy/haproxy-dist.tar.gz /tmp/haproxy/haproxy.tar.gz
RUN ls -alh && tar xf haproxy.tar.gz
FROM base
LABEL Name="HAProxy"
LABEL Vendor="MangaDex"
LABEL Maintainer="MangaDex <opensource@mangadex.org>"
ARG CANONICAL_VERSION="local-SNAPSHOT"
LABEL Version="${CANONICAL_VERSION}"
ARG HAPROXY_SSL_LIB="awslc"
COPY --chown=root:root --from=dists /tmp/${HAPROXY_SSL_LIB}/opt /opt
COPY --chown=root:root --from=dists /tmp/dataplaneapi/usr /usr
COPY --chown=root:root --from=dists /tmp/haproxy/usr /usr
RUN apt -q update && \
apt -qq -y --no-install-recommends install \
ca-certificates \
curl \
libatomic1 \
libjemalloc2 \
libssl3 \
libsystemd0 \
procps \
socat \
zlib1g && \
apt -qq -y --purge autoremove && \
apt -qq -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/* /var/log/* && \
groupadd "haproxy" && useradd -g "haproxy" "haproxy" && \
/usr/local/sbin/haproxy -vv
CMD [ "/usr/local/sbin/haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ]