library-syncer/client/build/Dockerfile

31 lines
614 B
Docker
Raw Normal View History

2022-08-05 21:29:22 +00:00
FROM alpine:3.16
2023-02-21 15:46:47 +00:00
LABEL org.opencontainers.image.source="https://github.com/jbowdre/content-library-rsync"
2022-08-05 21:29:22 +00:00
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 \
2023-02-21 15:46:47 +00:00
&& rm -rf /tmp/*
2022-08-05 21:29:22 +00:00
VOLUME ["/syncer/library", "/syncer/.ssh"]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "sh", "-c", "crond -l 2 -f" ]