0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-17 12:51:33 -05:00

Show tags in readme

This commit is contained in:
Adrian Dvergsdal 2016-07-31 16:56:13 +02:00
parent 3042075111
commit 23ba4072a8

View file

@ -1,10 +1,14 @@
atmoz/sftp # Supported tags and respective `Dockerfile` links
==========
Easy to use SFTP ([SSH File Transfer Protocol](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol)) server with [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH). This is an automated build linked with the [debian](https://hub.docker.com/_/debian/) repository. - [`debian`, `latest` (*Dockerfile*)](https://github.com/atmoz/sftp/blob/master/Dockerfile)
- [`alpine` (*Dockerfile*)](https://github.com/atmoz/sftp/blob/alpine/Dockerfile)
Usage # Securely share your files
-----
Easy to use SFTP ([SSH File Transfer Protocol](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol)) server with [OpenSSH](https://en.wikipedia.org/wiki/OpenSSH).
This is an automated build linked with the [debian](https://hub.docker.com/_/debian/) and [alpine](https://hub.docker.com/_/alpine/) repositories.
# Usage
- Define users as command arguments, STDIN or mounted in /etc/sftp-users.conf - Define users as command arguments, STDIN or mounted in /etc/sftp-users.conf
(syntax: `user:pass[:e][:uid[:gid]]...`). (syntax: `user:pass[:e][:uid[:gid]]...`).
@ -15,10 +19,9 @@ Usage
volumes in separate directories inside the user's home directory volumes in separate directories inside the user's home directory
(/home/user/**mounted-directory**). (/home/user/**mounted-directory**).
Examples # Examples
--------
### Simple docker run example ## Simple docker run example
``` ```
docker run \ docker run \
@ -27,7 +30,7 @@ docker run \
foo:123:1001 foo:123:1001
``` ```
#### Using Docker Compose: ### Using Docker Compose:
``` ```
sftp: sftp:
@ -39,13 +42,13 @@ sftp:
command: foo:123:1001 command: foo:123:1001
``` ```
#### Logging in ### Logging in
The OpenSSH server runs by default on port 22, and in this example, we are The OpenSSH server runs by default on port 22, and in this example, we are
forwarding the container's port 22 to the host's port 2222. To log in with the forwarding the container's port 22 to the host's port 2222. To log in with the
OpenSSH client, run: `sftp -P 2222 foo@<host-ip>` OpenSSH client, run: `sftp -P 2222 foo@<host-ip>`
### Store users in config ## Store users in config
``` ```
docker run \ docker run \
@ -63,7 +66,7 @@ foo:123:1001
bar:abc:1002 bar:abc:1002
``` ```
### Encrypted password ## Encrypted password
Add `:e` behind password to mark it as encrypted. Use single quotes if using terminal. Add `:e` behind password to mark it as encrypted. Use single quotes if using terminal.
@ -77,7 +80,7 @@ docker run \
Tip: you can use makepasswd to generate encrypted passwords: Tip: you can use makepasswd to generate encrypted passwords:
`echo -n "password" | makepasswd --crypt-md5 --clearfrom -` `echo -n "password" | makepasswd --crypt-md5 --clearfrom -`
### Using SSH key (without password) ## Using SSH key (without password)
Mount all public keys in the user's `.ssh/keys/` folder. All keys are automatically Mount all public keys in the user's `.ssh/keys/` folder. All keys are automatically
appended to `.ssh/authorized_keys`. appended to `.ssh/authorized_keys`.
@ -91,12 +94,12 @@ docker run \
foo::1001 foo::1001
``` ```
### Execute custom scripts or applications ## Execute custom scripts or applications
Put your programs in /etc/sftp.d/ and it will automatically run when the container starts. Put your programs in /etc/sftp.d/ and it will automatically run when the container starts.
See next section for an example. See next section for an example.
### Bindmount dirs from another location ## Bindmount dirs from another location
If you are using --volumes-from or just want to make a custom directory If you are using --volumes-from or just want to make a custom directory
available in user's home directory, you can add a script to /etc/sftp.d/ that available in user's home directory, you can add a script to /etc/sftp.d/ that