mirror of
https://github.com/atmoz/sftp.git
synced 2025-03-09 15:16:00 -04:00
Switch to alpine:3.4
This commit is contained in:
parent
3042075111
commit
b17233f306
1 changed files with 6 additions and 8 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,22 +1,20 @@
|
||||||
FROM debian:jessie
|
FROM alpine:3.4
|
||||||
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
MAINTAINER Adrian Dvergsdal [atmoz.net]
|
||||||
|
|
||||||
# - Install packages
|
# - Install packages
|
||||||
|
# - Fix default group (1000 does not exist)
|
||||||
# - OpenSSH needs /var/run/sshd to run
|
# - OpenSSH needs /var/run/sshd to run
|
||||||
# - Remove generic host keys, entrypoint generates unique keys
|
# - Remove generic host keys, entrypoint generates unique keys
|
||||||
RUN apt-get update && \
|
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
||||||
apt-get -y install openssh-server && \
|
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 && \
|
mkdir -p /var/run/sshd && \
|
||||||
rm -f /etc/ssh/ssh_host_*key* && \
|
rm -f /etc/ssh/ssh_host_*key*
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
|
||||||
COPY sshd_config /etc/ssh/sshd_config
|
COPY sshd_config /etc/ssh/sshd_config
|
||||||
COPY entrypoint /
|
COPY entrypoint /
|
||||||
COPY README.md /
|
COPY README.md /
|
||||||
|
|
||||||
VOLUME /etc/ssh
|
|
||||||
|
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint"]
|
ENTRYPOINT ["/entrypoint"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue