From 41a0de929e311efe5bb3607b73c26a1baef39a99 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 8 Apr 2020 21:47:50 -0400 Subject: [PATCH] Move openssh-server from the base image to the sshd template --- image/base/Dockerfile | 1 - templates/sshd.template.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/image/base/Dockerfile b/image/base/Dockerfile index 0e6252a..9baea65 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -44,7 +44,6 @@ RUN sed -i -e 's/start -q anacron/anacron -s/' /etc/cron.d/anacron RUN sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf RUN dpkg-divert --local --rename --add /sbin/initctl RUN sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl" -RUN apt -y install openssh-server RUN cd / &&\ apt -y install runit socat &&\ mkdir -p /etc/runit/1.d &&\ diff --git a/templates/sshd.template.yml b/templates/sshd.template.yml index 1de8538..b5f3c8f 100644 --- a/templates/sshd.template.yml +++ b/templates/sshd.template.yml @@ -33,6 +33,7 @@ run: - exec: hook: sshd cmd: + - apt -y install openssh-server - mkdir -p /var/run/sshd - mkdir -p /root/.ssh - echo "$ssh_key" >> /root/.ssh/authorized_keys -- 2.25.1