forked from axiom-data-science/rsync-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (19 loc) · 835 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
FROM debian:bullseye-slim
LABEL org.opencontainers.image.authors="Kyle Wilcox <kyle@axds.co>" \
org.opencontainers.image.url="https://github.com/axiom-data-science/rsync-server"
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV NOTVISIBLE "in users profile"
RUN apt-get update && \
apt-get install -y --no-install-recommends openssh-server rsync && \
apt-get clean && \
mkdir /var/run/sshd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \
echo "export VISIBLE=now" >> /etc/profile && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY entrypoint.sh /entrypoint.sh
EXPOSE 22
EXPOSE 873
ENTRYPOINT ["/entrypoint.sh"]
CMD ["rsync_server"]