From 8c0e4f724de88ff13b4d13c139fd246280ed0286 Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 12 Feb 2020 09:54:46 +0800 Subject: [PATCH] add sftp --- README.md | 1 + sftp/README.md | 34 ++++++++++++++++++++++++++++++++++ sftp/data/users.conf | 3 +++ sftp/docker-compose.yml | 9 +++++++++ 4 files changed, 47 insertions(+) create mode 100644 sftp/README.md create mode 100644 sftp/data/users.conf create mode 100644 sftp/docker-compose.yml diff --git a/README.md b/README.md index 488fc1c..98fe120 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,7 @@ A collection of delicious docker recipes. - [x] vnc - selenoid-ui - [x] sentry +- [x] atmoz/sftp - [x] scrapinghub/splash - [x] teamatldocker - [x] confluence diff --git a/sftp/README.md b/sftp/README.md new file mode 100644 index 0000000..cb8d929 --- /dev/null +++ b/sftp/README.md @@ -0,0 +1,34 @@ +sftp +==== + +![](https://raw.githubusercontent.com/atmoz/sftp/master/openssh.png) + +## up and running + +```bash +$ chown root:root data + +$ docker-compose up -d + +$ sftp -P 2222 foo@localhost +foo@localhost's password: ****** +Connected to foo@localhost. +>>> version +SFTP protocol version 3 +>>> ls +upload +>>> put README.md upload +Uploading README.md to /upload/README.md +>>> bye + +$ tree data +data +├── bar +├── baz +├── foo +│   └── upload +│   └── README.md +└── users.conf +``` + +:warning: Changes to existing users are ignored. diff --git a/sftp/data/users.conf b/sftp/data/users.conf new file mode 100644 index 0000000..ce0cfff --- /dev/null +++ b/sftp/data/users.conf @@ -0,0 +1,3 @@ +foo:123:1001:100:upload +bar:abc:1002:100:upload +baz:xyz:1003:100:upload diff --git a/sftp/docker-compose.yml b/sftp/docker-compose.yml new file mode 100644 index 0000000..403e984 --- /dev/null +++ b/sftp/docker-compose.yml @@ -0,0 +1,9 @@ +sftp: + image: atmoz/sftp:alpine + ports: + - "2222:22" + volumes: + - /etc/ssh + - ./data:/home + - ./data/users.conf:/etc/sftp/users.conf:ro + restart: unless-stopped