diff --git a/Dockerfile b/Dockerfile index 55cf123..dd7d6bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,11 @@ FROM debian:bullseye MAINTAINER Adrian Dvergsdal [atmoz.net] # Steps done in one RUN layer: -# - Install packages +# - Install upgrades and new packages # - OpenSSH needs /var/run/sshd to run # - Remove generic host keys, entrypoint generates unique keys RUN apt-get update && \ + apt-get upgrade -y && \ DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends openssh-server && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p /var/run/sshd && \ diff --git a/Dockerfile-alpine b/Dockerfile-alpine index e8a36b2..f380f7d 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -2,10 +2,12 @@ FROM alpine:latest MAINTAINER Adrian Dvergsdal [atmoz.net] # Steps done in one RUN layer: -# - Install packages +# - Install upgrades and new packages # - OpenSSH needs /var/run/sshd to run # - Remove generic host keys, entrypoint generates unique keys -RUN apk add --no-cache bash shadow openssh-server-pam openssh-sftp-server && \ +RUN apk update && apk upgrade && \ + apk add bash shadow openssh-server-pam openssh-sftp-server && \ + rm -rf /var/cache/apk/* && \ ln -s /usr/sbin/sshd.pam /usr/sbin/sshd && \ mkdir -p /var/run/sshd && \ rm -f /etc/ssh/ssh_host_*key*