haproxy/Dockerfile

44 lines
1.2 KiB
Docker
Raw Normal View History

2022-06-06 12:44:11 +05:30
FROM docker.io/library/debian:bullseye as base
2022-06-06 13:36:05 +05:30
# This stage is mostly to import and unpack the dists in a docker-friendly fashion
2022-06-06 12:44:11 +05:30
FROM base as dists
RUN apt -qq update && apt install -qq -y bzip2
WORKDIR /tmp/quictls
2022-06-06 13:36:05 +05:30
COPY ./deps/quictls/quictls-dist.tar.gz /tmp/quictls/quictls.tar.gz
2022-06-06 12:44:11 +05:30
RUN ls -alh && tar xf quictls.tar.gz
WORKDIR /tmp/haproxy
2022-06-06 13:36:05 +05:30
COPY ./haproxy/haproxy-dist.tar.gz /tmp/haproxy/haproxy.tar.gz
2022-06-06 12:44:11 +05:30
RUN ls -alh && tar xf haproxy.tar.gz
FROM base
LABEL Name=HAProxy
LABEL Vendor=MangaDex
MAINTAINER MangaDex <opensource@mangadex.org>
ARG CANONICAL_VERSION="local-SNAPSHOT"
LABEL Version=${CANONICAL_VERSION}
COPY --chown=root:root --from=dists /tmp/quictls/opt /opt
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 \
libssl1.1 \
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"
CMD [ "/usr/local/sbin/haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ]