update base image to minimize image size

This commit is contained in:
newnius
2017-07-18 21:27:08 +08:00
parent 1a8c9bb3ff
commit 9b87b97752
3 changed files with 27 additions and 4 deletions

View File

@@ -1,9 +1,13 @@
FROM ubuntu
RUN apt update \
&& apt install -y openssh-server
FROM alpine:3.6
MAINTAINER Newnius <docker@newnius.com>
RUN apk add --no-cache openssh
RUN ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
RUN cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ADD bootstrap.sh /etc/bootstrap.sh
CMD ["bash", "/etc/bootstrap.sh"]