Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aligator/sftp-docker
A simple sftp service using docker.
https://github.com/aligator/sftp-docker
Last synced: 7 days ago
JSON representation
A simple sftp service using docker.
- Host: GitHub
- URL: https://github.com/aligator/sftp-docker
- Owner: aligator
- Created: 2021-02-01T19:31:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-23T21:33:43.000Z (over 3 years ago)
- Last Synced: 2024-05-21T05:01:07.898Z (6 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SFTP for docker
This is a small docker image which just provides a simple sftp server.
It starts sshd but disables normal ssh access. Instead you can mount any data at /ssh-home/data
which will be accessible using sftp.Currently it does only provide access using private keys because for me there was no need for
username + password, but this would be very easy to implement if needed...## Usage
Just see the example docker-compose.yml it basically shows everything you need:
* expose port 22
* mount data to /ssh-home/data
* mount override to /override
* set the environment variables for uid, gid and usernameThen you just need to provide any public keys by creating a `overwrite/authorized_keys` file.
It will be copied (if it exists) into the container on each start. That way you can also edit it and with the next
restart it will be copied into the container.Similar to that you can also provide a custom `overwrite/sshd_config` file which will also be treated the same way to
inject a custom sshd config into the container.The host keys get built automatically on the first start. But you can also run `cd overwrite && ./genHostKeys.sh` to
even preserve the keys on container rebuilt.