mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-12-13 00:12:39 +01:00
Use `apk --no-cache' on alpine images (#144)
This enables us to remove the following patterns that required a `rm -rf /var/cache/apk`: - `apk update` - `apk add --update` - `apk add --update-cache` Supported since alpine 3.3.
This commit is contained in:
committed by
Jess Frazelle
parent
5a6ef53d6a
commit
7ac4881609
@@ -10,10 +10,9 @@ MAINTAINER Jessica Frazelle <jess@docker.com>
|
||||
|
||||
ENV HOME /root
|
||||
|
||||
RUN apk update && apk add \
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
openssh \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& sed -i "s/#PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config \
|
||||
&& sed -i "s/#PubkeyAuthentication yes/PubkeyAuthentication yes/" /etc/ssh/sshd_config \
|
||||
&& echo -e "AllowUsers git\n" >> /etc/ssh/sshd_config \
|
||||
|
||||
Reference in New Issue
Block a user