2018-02-08 12:57:29 +00:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
2014-11-16 15:42:55 +00:00
|
|
|
|
|
|
|
ENV USER share
|
|
|
|
ENV PASS changeme
|
2015-06-02 18:55:37 +00:00
|
|
|
ENV USER_UID 1000
|
2014-11-16 15:42:55 +00:00
|
|
|
|
2018-02-08 12:57:29 +00:00
|
|
|
ENV DI_VERSION 1.2.1
|
2016-03-25 16:35:38 +00:00
|
|
|
|
|
|
|
|
2018-02-08 13:12:59 +00:00
|
|
|
RUN apk --no-cache add bash curl openssh-server openssh-sftp-server openssl shadow \
|
2016-03-25 16:35:38 +00:00
|
|
|
&& mkdir /var/run/sshd && chmod 0755 /var/run/sshd \
|
2018-02-08 12:57:29 +00:00
|
|
|
&& curl -sSfLo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DI_VERSION}/dumb-init_${DI_VERSION}_amd64 \
|
|
|
|
&& chmod +x /usr/local/bin/dumb-init \
|
|
|
|
&& apk --no-cache del curl
|
2014-11-16 15:42:55 +00:00
|
|
|
|
|
|
|
ADD start.sh /usr/local/bin/start.sh
|
|
|
|
ADD sshd_config /etc/ssh/sshd_config
|
|
|
|
|
2016-03-25 16:35:38 +00:00
|
|
|
VOLUME ["/data", "/ssh"]
|
2014-11-16 15:42:55 +00:00
|
|
|
EXPOSE 22
|
|
|
|
|
2016-03-25 16:35:38 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/dumb-init"]
|
|
|
|
CMD ["/usr/local/bin/start.sh"]
|