generated from szaimen/aio-fail2ban
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
29 lines (22 loc) · 769 Bytes
/
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
FROM caddy:2.9.1-builder-alpine AS builder
ENV CADDY_HASH=d82618e1407aacb3a3fbc1a8c0ee58e895337c1b
RUN set -ex; \
xcaddy build --with github.com/porech/caddy-maxmind-geolocation@"$CADDY_HASH"
FROM alpine:3.21.2
# hadolint ignore=DL3018
RUN set -ex; \
apk add --no-cache shadow; \
groupdel www-data; \
addgroup -g 33 -S www-data; \
adduser -u 33 -D -S -G www-data www-data; \
apk del shadow; \
apk add --no-cache tzdata bash bind-tools netcat-openbsd util-linux-misc; \
mkdir -p /data/caddy; \
chown 33:33 -R /data; \
chmod 770 -R /data
VOLUME /data
COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy
COPY --chmod=775 start.sh /start.sh
COPY --chown=33:33 Caddyfile /Caddyfile
USER www-data
ENTRYPOINT [ "/start.sh" ]