0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2025-01-19 13:46:11 -05:00
atmoz-sftp/Dockerfile

22 lines
640 B
Text
Raw Normal View History

2024-07-15 00:33:16 +02:00
FROM debian:bookworm
2014-10-16 22:08:13 +02:00
MAINTAINER Adrian Dvergsdal [atmoz.net]
2014-10-07 21:34:24 +02:00
# Steps done in one RUN layer:
2024-07-14 22:49:50 +02:00
# - Install upgrades and new packages
2016-06-02 14:56:30 +02:00
# - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys
2014-10-16 22:08:13 +02:00
RUN apt-get update && \
2024-07-14 22:49:50 +02:00
apt-get upgrade -y && \
DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends openssh-server && \
2016-08-06 17:44:44 +02:00
rm -rf /var/lib/apt/lists/* && \
2016-06-02 14:56:30 +02:00
mkdir -p /var/run/sshd && \
2016-08-06 17:44:44 +02:00
rm -f /etc/ssh/ssh_host_*key*
2014-10-07 21:34:24 +02:00
COPY files/sshd_config /etc/ssh/sshd_config
COPY files/create-sftp-user /usr/local/bin/
COPY files/entrypoint /
2014-10-07 21:34:24 +02:00
EXPOSE 22
2014-12-31 16:35:46 +01:00
ENTRYPOINT ["/entrypoint"]