2022-03-07 13:55:05 +01:00
|
|
|
FROM alpine:3.14
|
2020-04-08 13:05:07 +02:00
|
|
|
|
2021-02-25 12:37:00 +01:00
|
|
|
RUN apk add --no-cache python3 py3-pip su-exec && \
|
2020-04-08 13:05:07 +02:00
|
|
|
pip3 install --upgrade pip && \
|
|
|
|
pip3 install vdirsyncer vdirsyncer[google] requests_oauthlib && \
|
2021-02-25 12:37:00 +01:00
|
|
|
addgroup --gid 10001 vdirsyncer && \
|
|
|
|
adduser \
|
|
|
|
--empty-password \
|
|
|
|
--home /var/lib/vdirsyncer \
|
|
|
|
--uid 10000 \
|
|
|
|
--ingroup vdirsyncer \
|
|
|
|
vdirsyncer && \
|
2020-04-08 13:05:07 +02:00
|
|
|
mkdir -p /var/lib/vdirsyncer/status /var/lib/vdirsyncer/tokens && \
|
|
|
|
touch /var/lib/vdirsyncer/config && \
|
|
|
|
chown -R vdirsyncer:vdirsyncer /var/lib/vdirsyncer
|
|
|
|
|
|
|
|
COPY crontab /crontab
|
|
|
|
COPY entrypoint.sh /entrypoint
|
|
|
|
COPY do_sync.sh /do_sync
|
|
|
|
RUN chmod +x /entrypoint /do_sync
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|
|
|
|
CMD ["task"]
|
|
|
|
|
|
|
|
ENV VDIRSYNCER_CONFIG /var/lib/vdirsyncer/config
|