mirror of
https://github.com/jbowdre/library-syncer.git
synced 2024-11-27 03:32:18 +00:00
31 lines
608 B
Docker
31 lines
608 B
Docker
|
FROM alpine:3.16
|
||
|
|
||
|
LABEL org.opencontainers.image.source="https://github.com/jbowdre/library-syncer"
|
||
|
|
||
|
ENV CRONTAB_FILE=/var/spool/cron/crontabs/root
|
||
|
|
||
|
EXPOSE 80/tcp
|
||
|
|
||
|
RUN apk add --no-cache \
|
||
|
caddy \
|
||
|
openssh-client \
|
||
|
python3 \
|
||
|
rsync \
|
||
|
tzdata
|
||
|
|
||
|
RUN mkdir /syncer
|
||
|
|
||
|
COPY ./Caddyfile /etc/caddy/Caddyfile
|
||
|
COPY ./update_library_manifests.py /syncer/
|
||
|
COPY ./sync.sh /syncer/
|
||
|
COPY ./entrypoint.sh /
|
||
|
|
||
|
RUN chmod +x /entrypoint.sh \
|
||
|
&& chmod +x /syncer/sync.sh \
|
||
|
&& rm -rf /tmp/*
|
||
|
|
||
|
VOLUME ["/syncer/library", "/syncer/.ssh"]
|
||
|
|
||
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
||
|
CMD [ "sh", "-c", "crond -l 2 -f" ]
|