apk upgrade on build and use --no-cache

This commit is contained in:
Dennis Hermsmeier 2018-05-21 13:27:08 +02:00 committed by GitHub
parent e65a6cf91a
commit b3b70e43d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,10 @@
FROM alpine:latest
LABEL maintainer "https://github.com/hermsi1337"
LABEL maintainer="https://github.com/hermsi1337"
ENV ROOT_PASSWORD root
RUN apk --update add openssh \
RUN apk upgrade && apk add --no-cache openssh \
&& sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config \
&& echo "root:${ROOT_PASSWORD}" | chpasswd \
&& rm -rf /var/cache/apk/* /tmp/*