0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2025-01-12 13:38:55 -05:00
atmoz-sftp/Dockerfile
2016-07-31 15:39:11 +02:00

20 lines
642 B
Docker

FROM alpine:3.4
MAINTAINER Adrian Dvergsdal [atmoz.net]
# - 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 echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk add --no-cache bash shadow@testing 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 sshd_config /etc/ssh/sshd_config
COPY entrypoint /
COPY README.md /
EXPOSE 22
ENTRYPOINT ["/entrypoint"]