mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-17 12:51:33 -05:00
21 lines
640 B
Docker
21 lines
640 B
Docker
FROM debian:bookworm
|
|
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
|
|
|
# Steps done in one RUN layer:
|
|
# - Install upgrades and new packages
|
|
# - OpenSSH needs /var/run/sshd to run
|
|
# - Remove generic host keys, entrypoint generates unique keys
|
|
RUN apt-get update && \
|
|
apt-get upgrade -y && \
|
|
DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends openssh-server && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
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"]
|