forked from atmoz/sftp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM debian:jessie
MAINTAINER Ted Zlatanov <[email protected]>
LABEL org.label-schema.vendor="Ted Zlatanov <[email protected]>" \
org.label-schema.url="http://lifelogs.com/" \
org.label-schema.name="sftp" \
org.label-schema.description="SFTP server with S3 capability (clones atmoz/sftp)" \
org.label-schema.usage="/README.md" \
org.label-schema.license="Apache" \
org.label-schema.schema-version="1.0" \
org.label-schema.docker.params=""
# - Install packages
# - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys
RUN apt-get update && \
apt-get -y install openssh-server && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/run/sshd && \
rm -f /etc/ssh/ssh_host_*key*
# - Install packages to build s3fs and make it
RUN apt-get update && \
apt-get -y install automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git && \
cd s3fs-fuse && \
./autogen.sh && \
./configure && \
make && \
make install
COPY sshd_config /etc/ssh/sshd_config
COPY entrypoint /
COPY README.md /
EXPOSE 22
ENTRYPOINT ["/entrypoint"]