Files
projects/Dockers/gluetun-pia-wireguard-rotator/Dockerfile
T
Bram 0bab637862
Build and Push Docker Images / build-and-push (push) Successful in 20s
some more updates
2026-08-14 20:11:11 +02:00

29 lines
957 B
Docker

FROM docker:cli
RUN apk add --no-cache ca-certificates tzdata python3 py3-pip \
&& python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install --no-cache-dir 'croniter==6.2.4' 'cryptography>=42,<47' \
&& apk del py3-pip
ENV PATH="/opt/venv/bin:$PATH"
COPY pia.py rotate.py entrypoint.py entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/rotate.py /usr/local/bin/entrypoint.py /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_CRON="0 3 * * *"
ENV REGION_SELECT=fastest
ENV SERVERLIST_CACHE_PATH=/config/cache/pia-serverlist.json
ENV SERVERLIST_CACHE_TTL=24h
ENV SERVERLIST_CACHE_MAX_AGE=168h
ENV TOKEN_CACHE_PATH=/config/cache/pia-token.json
ENV TOKEN_CACHE_TTL=20h
ENV PIA_CA_PATH=/config/cache/ca.rsa.4096.crt
ENV LATENCY_SWITCH_MARGIN_MS=15
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]