to python
Build and Push Docker Images / build-and-push (push) Successful in 1m8s

This commit is contained in:
2026-08-14 19:40:19 +02:00
parent d5791a4ac5
commit 7a5b2ac3bd
4 changed files with 126 additions and 76 deletions
@@ -7,17 +7,22 @@ RUN apk add --no-cache git ca-certificates \
FROM docker:cli
RUN apk add --no-cache bash ca-certificates tzdata jq
RUN apk add --no-cache bash ca-certificates tzdata jq python3 py3-pip \
&& python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install --no-cache-dir 'croniter==6.2.4' \
&& apk del py3-pip
ENV PATH="/opt/venv/bin:$PATH"
COPY --from=builder /go/bin/pia-wg-config /usr/local/bin/pia-wg-config
COPY rotate.sh entrypoint.sh /usr/local/bin/
COPY rotate.sh entrypoint.py /usr/local/bin/
RUN chmod +x /usr/local/bin/rotate.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/rotate.sh /usr/local/bin/entrypoint.py
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
ENV ROTATE_CRON="0 3 * * *"
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
ENTRYPOINT ["/opt/venv/bin/python", "/usr/local/bin/entrypoint.py"]