Skip to content

Commit

Permalink
blobserver/sftp: add SFTP storage target
Browse files Browse the repository at this point in the history
Fixes #1111

Change-Id: I4bedfa44241c1e6cc607658c991179ee04f9eb31
  • Loading branch information
bradfitz committed May 12, 2018
1 parent b76a4f6 commit b57013c
Show file tree
Hide file tree
Showing 81 changed files with 21,547 additions and 68 deletions.
21 changes: 19 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Expand Up @@ -231,7 +231,7 @@ ignored = [

[[constraint]]
name = "golang.org/x/crypto"
revision = "13931e22f9e72ea58bb73048bc752b48c6d4d4ac"
revision = "master"

[[constraint]]
name = "golang.org/x/image"
Expand Down
36 changes: 36 additions & 0 deletions pkg/blobserver/sftp/Dockerfile.sftp-server
@@ -0,0 +1,36 @@
# For debugging sftp-server crashes.
# https://twitter.com/bradfitz/status/994307991712104448
# https://twitter.com/bradfitz/status/994317057381449728

# docker build -f Dockerfile.sftp-server -t openssh .
# docker run -p 1150:115 openssh
# Then an integration JSON file like:
# {"user": "RAWSFTPNOSSH", "dir": ".", "addr": "localhost:1150"}


FROM debian:jessie

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install --no-install-recommends --yes autoconf automake gcc libc6-dev \
curl ca-certificates zlib1g-dev libssl-dev make
RUN apt-get install --no-install-recommends --yes make

# Synology NAS's crashing version; https://twitter.com/bradfitz/status/994317057381449728
ARG opensshver=6.8p1

WORKDIR /root
RUN curl -O https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-$opensshver.tar.gz
RUN tar -zxvf openssh-$opensshver.tar.gz

WORKDIR openssh-$opensshver

RUN ./configure --without-openssl-header-check
RUN make
RUN make install

RUN apt-get install --no-install-recommends --yes inetutils-inetd

RUN mkdir /tmp/sftp-root
RUN echo "sftp stream tcp nowait root /usr/local/libexec/sftp-server -e -l DEBUG3 -d /tmp/sftp-root" >> /etc/inetd.conf
CMD ["/usr/sbin/inetutils-inetd", "-d"]

0 comments on commit b57013c

Please sign in to comment.