From 7cc7dbd9271289ceeeabd72234b2eb6341b5592a Mon Sep 17 00:00:00 2001 From: nold Date: Fri, 27 Oct 2017 11:29:02 +0200 Subject: [PATCH] Small Dockerfile improvements --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index df6546c..96b6ab9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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