FROM alpine:3.10

RUN apk update && \
    apk add --no-cache bash openssh openssh-sftp-server && \
    mkdir /root/.ssh && \
    chmod 0700 /root/.ssh && \
    ssh-keygen -A && \
    echo root:Password | chpasswd && \
    mkdir -p /home/sftpuser/upload

EXPOSE 22

CMD ["/usr/sbin/sshd", "-D", "-e"]
