Small Dockerfile improvements

This commit is contained in:
nold 2017-10-27 11:29:02 +02:00
parent 9e800b88e4
commit 7cc7dbd927

View file

@ -10,11 +10,14 @@ VOLUME /sshkeys
# Volume for borg repositories
VOLUME /backup
RUN apt-get update && apt-get -y install borgbackup openssh-server
RUN useradd -s /bin/bash -m borg
RUN mkdir /home/borg/.ssh && chmod 700 /home/borg/.ssh && chown borg: /home/borg/.ssh
RUN mkdir /run/sshd
RUN rm -f /etc/ssh/ssh_host*key*
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y --no-install-recommends install borgbackup openssh-server && apt-get clean
RUN useradd -s /bin/bash -m borg ; \
mkdir /home/borg/.ssh && chmod 700 /home/borg/.ssh && chown borg: /home/borg/.ssh ; \
mkdir /run/sshd
RUN rm -f /etc/ssh/ssh_host*key* ; \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
COPY ./data/run.sh /run.sh
COPY ./data/sshd_config /etc/ssh/sshd_config