You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-sftp/Dockerfile

17 lines
574 B

4 years ago
FROM alpine:latest
# Steps done in one RUN layer:
# - Install packages
# - Fix default group (1000 does not exist)
# - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys
4 years ago
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk add --no-cache bash shadow@community openssh openssh-sftp-server && \
4 years ago
sed -i 's/GROUP=1000/GROUP=100/' /etc/default/useradd && \
mkdir -p /var/run/sshd && \
rm -f /etc/ssh/ssh_host_*key*
COPY root/ /
ENTRYPOINT ["/entrypoint.sh"]