2020-07-17 10:24:33 -04:00
|
|
|
FROM alpine:latest
|
|
|
|
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
|
|
|
|
|
|
|
# Steps done in one RUN layer:
|
|
|
|
# - Install packages
|
|
|
|
# - OpenSSH needs /var/run/sshd to run
|
|
|
|
# - Remove generic host keys, entrypoint generates unique keys
|
2024-07-06 06:11:02 -04:00
|
|
|
RUN apk add --no-cache bash shadow openssh-server-pam openssh-sftp-server && \
|
2022-02-22 16:15:25 -05:00
|
|
|
ln -s /usr/sbin/sshd.pam /usr/sbin/sshd && \
|
2020-07-17 10:24:33 -04:00
|
|
|
mkdir -p /var/run/sshd && \
|
|
|
|
rm -f /etc/ssh/ssh_host_*key*
|
|
|
|
|
|
|
|
COPY files/sshd_config /etc/ssh/sshd_config
|
|
|
|
COPY files/create-sftp-user /usr/local/bin/
|
|
|
|
COPY files/entrypoint /
|
|
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|