library-syncer/server/build/Dockerfile

27 lines
630 B
Docker
Raw Permalink 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 SYNC_CMD='command="/usr/bin/rrsync -ro /syncer/library/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding'
RUN apk add --no-cache \
openssh-server \
rsync \
rrsync \
tzdata
2022-08-15 22:00:18 +00:00
RUN mkdir /syncer
2022-08-05 21:29:22 +00:00
USER root
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh \
&& rm -rf /tmp/* \
&& rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key
EXPOSE 22/tcp
VOLUME [ "/syncer/library", "/home/syncer/.ssh" ]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/usr/sbin/sshd", "-D" ]