diff --git a/Dockerfile b/Dockerfile index 75b780c..73d4bdc 100755 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ MAINTAINER b3vis #Install Borg & SSH RUN apk add openssh sshfs borgbackup supervisor --no-cache RUN adduser -D -u 1000 borg && \ - ssh-keygen -A && \ mkdir /backups && \ chown borg.borg /backups && \ sed -i \ @@ -11,6 +10,7 @@ RUN adduser -D -u 1000 borg && \ -e 's/^PermitRootLogin without-password$/PermitRootLogin no/g' \ /etc/ssh/sshd_config COPY supervisord.conf /etc/supervisord.conf +COPY service.sh /usr/local/bin/service.sh RUN passwd -u borg EXPOSE 22 CMD ["/usr/bin/supervisord"] diff --git a/README.md b/README.md index f89fca2..15ed406 100755 --- a/README.md +++ b/README.md @@ -44,4 +44,4 @@ docker create \ ``` ### Note -After creating the container you will need to start the container add your own public keys +After creating the container you will need to start the container add your own public keys. diff --git a/service.sh b/service.sh new file mode 100755 index 0000000..8e5081a --- /dev/null +++ b/service.sh @@ -0,0 +1,3 @@ +#!/bin/sh +ssh-keygen -A +/usr/sbin/sshd -D diff --git a/supervisord.conf b/supervisord.conf index eb23757..721f9ae 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -2,4 +2,4 @@ nodaemon=true [program:sshd] -command=/usr/sbin/sshd -D +command=/usr/local/bin/service.sh