From c8e0a481d4637f1152e1b9762eb05ab589931c4c Mon Sep 17 00:00:00 2001 From: Adrian Dvergsdal Date: Sun, 14 Jul 2024 22:49:50 +0200 Subject: [PATCH] Install upgrades --- Dockerfile | 3 ++- Dockerfile-alpine | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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*