forked from axiom-data-science/rsync-server
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
29 lines (24 loc) · 864 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ubuntu:jammy
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
LABEL org.opencontainers.image.source=https://github.com/apnar/docker-image-rsync-server
RUN apt-get update && apt-get install -y \
openssh-server \
rsync \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Setup SSH
# https://docs.docker.com/engine/examples/running_ssh_service/
EXPOSE 22
RUN mkdir /var/run/sshd
RUN sed -i 's/.*PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
# Setup rsync
EXPOSE 873
CMD ["rsync_server"]
ENTRYPOINT ["/entrypoint.sh"]
COPY entrypoint.sh /entrypoint.sh
COPY pipework /usr/bin/pipework
RUN chmod 744 /entrypoint.sh