FROM debian:jessie MAINTAINER Valentin Lab RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install --force-yes -y --no-install-recommends openssh-server sudo rsync && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* COPY ./src/usr/local/sbin/* /usr/local/sbin/ ## New user/group rsync/rsync with home dir in /var/lib/rsync RUN mkdir -p /var/lib/rsync && \ groupadd -r rsync && \ useradd -r rsync -d /var/lib/rsync -g rsync && \ chown rsync:rsync /var/lib/rsync ## Allow rsync to access /var/mirror COPY /src/etc/sudoers.d/rsync /etc/sudoers.d/rsync RUN chmod 440 /etc/sudoers.d/* RUN mkdir /var/run/sshd COPY ./entrypoint.sh /entrypoint.sh EXPOSE 22 ENTRYPOINT [ "/entrypoint.sh" ]