2017-09-23 15:59:00 -04:00
|
|
|
FROM debian:stretch
|
2014-10-16 16:08:13 -04:00
|
|
|
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
2014-10-07 15:34:24 -04:00
|
|
|
|
2017-10-08 12:36:51 -04:00
|
|
|
# Steps done in one RUN layer:
|
2016-06-02 08:56:30 -04:00
|
|
|
# - Install packages
|
|
|
|
# - OpenSSH needs /var/run/sshd to run
|
|
|
|
# - Remove generic host keys, entrypoint generates unique keys
|
2014-10-16 16:08:13 -04:00
|
|
|
RUN apt-get update && \
|
2016-08-06 12:30:12 -04:00
|
|
|
apt-get -y install openssh-server && \
|
2016-08-06 11:44:44 -04:00
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
2016-06-02 08:56:30 -04:00
|
|
|
mkdir -p /var/run/sshd && \
|
2016-08-06 11:44:44 -04:00
|
|
|
rm -f /etc/ssh/ssh_host_*key*
|
2014-10-07 15:34:24 -04:00
|
|
|
|
2014-12-31 10:35:46 -05:00
|
|
|
COPY sshd_config /etc/ssh/sshd_config
|
2018-11-15 18:57:33 -05:00
|
|
|
COPY create-sftp-user /usr/local/bin/
|
2014-12-31 10:35:46 -05:00
|
|
|
COPY entrypoint /
|
2014-10-07 15:34:24 -04:00
|
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
2014-12-31 10:35:46 -05:00
|
|
|
ENTRYPOINT ["/entrypoint"]
|