Files
projects/Dockers/gluetun-pia-wireguard-rotator/Dockerfile
T
Bram 2b25780f3e
Build and Push Docker Images / build-and-push (push) Successful in 56s
pia wireguard rotator
2026-06-04 18:29:43 +02:00

22 lines
625 B
Docker

FROM golang:1.23-alpine AS builder
RUN apk add --no-cache git ca-certificates \
&& go install github.com/kylegrantlucas/pia-wg-config@v1.1.1
FROM docker:cli
RUN apk add --no-cache bash ca-certificates tzdata jq
COPY --from=builder /go/bin/pia-wg-config /usr/local/bin/pia-wg-config
COPY rotate.sh entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/rotate.sh /usr/local/bin/entrypoint.sh
ENV TZ=Europe/Brussels
ENV WG_CONFIG_PATH=/config/wireguard/wg0.conf
ENV ROTATOR_STATE_PATH=/config/rotator-state.json
ENV GLUETUN_CONTAINER=m3u-filter-vpn
ENV ROTATE_AT=03:00
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]