mirror of
https://github.com/atmoz/sftp.git
synced 2025-03-09 15:16:00 -04:00

Fix a startup issue with error message: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/entrypoint": permission denied: unknown.
22 lines
700 B
Text
22 lines
700 B
Text
FROM alpine:latest
|
|
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
|
|
|
# Steps done in one RUN layer:
|
|
# - Install packages
|
|
# - OpenSSH needs /var/run/sshd to run
|
|
# - Remove generic host keys, entrypoint generates unique keys
|
|
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
|
|
apk add --no-cache bash shadow@community openssh-server-pam openssh-sftp-server && \
|
|
ln -s /usr/sbin/sshd.pam /usr/sbin/sshd && \
|
|
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 /
|
|
|
|
RUN chmod +x /entrypoint
|
|
|
|
EXPOSE 22
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|