2024-06-22 00:01:51 +00:00
|
|
|
FROM docker.io/caddy:2.8.4-alpine@sha256:896c6fb9e3eae11890f53dc528b8a9be1b4d058f6b7603024feb084fc203c0b4
|
2023-08-09 10:46:05 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.title="Caddy"
|
2023-11-08 08:04:15 +00:00
|
|
|
LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/caddy"
|
|
|
|
LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/caddy"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/caddy"
|
2023-08-09 10:46:05 +00:00
|
|
|
|
|
|
|
ARG TARGETOS
|
|
|
|
ARG TARGETARCH
|
|
|
|
ARG TARGETVARIANT
|
|
|
|
|
|
|
|
ARG GOMPLATE_VERSION
|
|
|
|
|
|
|
|
# renovate: datasource=github-releases depName=hairyhenderson/gomplate
|
2024-06-21 19:15:32 +00:00
|
|
|
ENV GOMPLATE_VERSION="${GOMPLATE_VERSION:-v4.0.0}"
|
2023-08-09 10:46:05 +00:00
|
|
|
|
|
|
|
RUN addgroup -g 101 -S caddy && \
|
|
|
|
adduser -S -D -H -u 101 -h /var/www -s /sbin/nologin -G caddy -g caddy caddy && \
|
|
|
|
apk --update add --virtual .build-deps curl && \
|
2023-11-14 14:27:26 +00:00
|
|
|
apk --no-cache upgrade libcrypto3 libssl3 && \
|
2023-08-09 10:46:05 +00:00
|
|
|
curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \
|
|
|
|
chmod 755 /usr/local/bin/gomplate && \
|
|
|
|
chown -R caddy:caddy /config /data /etc/caddy /srv && \
|
|
|
|
chmod -R 750 /config /data /etc/caddy /srv && \
|
|
|
|
apk del .build-deps && \
|
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
rm -rf /tmp/*
|
|
|
|
|
|
|
|
ADD overlay/ /
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
EXPOSE 443
|
|
|
|
EXPOSE 443/udp
|
|
|
|
EXPOSE 2019
|
|
|
|
|
|
|
|
USER caddy
|
|
|
|
|
|
|
|
WORKDIR /srv
|
|
|
|
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|