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 RUN apk add --no-cache openssh openssh-sftp-server && \ 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"]