0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-17 12:51:33 -05:00
atmoz-sftp/Dockerfile-alpine

22 lines
634 B
Text
Raw Permalink Normal View History

FROM alpine:latest
MAINTAINER Adrian Dvergsdal [atmoz.net]
# Steps done in one RUN layer:
2024-07-14 16:49:50 -04:00
# - Install upgrades and new packages
# - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys
2024-07-14 16:49:50 -04:00
RUN apk update && apk upgrade && \
apk add bash shadow openssh-server-pam openssh-sftp-server && \
rm -rf /var/cache/apk/* && \
ln -s /usr/sbin/sshd.pam /usr/sbin/sshd && \
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"]