mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-17 12:51:33 -05:00
parent
79b46e3aec
commit
c6285fe34c
1 changed files with 11 additions and 11 deletions
22
README.md
22
README.md
|
@ -47,7 +47,7 @@ Let's mount a directory and set UID:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /host/upload:/home/foo/upload \
|
-v <host-dir>/upload:/home/foo/upload \
|
||||||
-p 2222:22 -d atmoz/sftp \
|
-p 2222:22 -d atmoz/sftp \
|
||||||
foo:pass:1001
|
foo:pass:1001
|
||||||
```
|
```
|
||||||
|
@ -58,7 +58,7 @@ docker run \
|
||||||
sftp:
|
sftp:
|
||||||
image: atmoz/sftp
|
image: atmoz/sftp
|
||||||
volumes:
|
volumes:
|
||||||
- /host/upload:/home/foo/upload
|
- <host-dir>/upload:/home/foo/upload
|
||||||
ports:
|
ports:
|
||||||
- "2222:22"
|
- "2222:22"
|
||||||
command: foo:pass:1001
|
command: foo:pass:1001
|
||||||
|
@ -72,12 +72,12 @@ The OpenSSH server runs by default on port 22, and in this example, we are forwa
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /host/users.conf:/etc/sftp/users.conf:ro \
|
-v <host-dir>/users.conf:/etc/sftp/users.conf:ro \
|
||||||
-v mySftpVolume:/home \
|
-v mySftpVolume:/home \
|
||||||
-p 2222:22 -d atmoz/sftp
|
-p 2222:22 -d atmoz/sftp
|
||||||
```
|
```
|
||||||
|
|
||||||
/host/users.conf:
|
<host-dir>/users.conf:
|
||||||
|
|
||||||
```
|
```
|
||||||
foo:123:1001:100
|
foo:123:1001:100
|
||||||
|
@ -91,7 +91,7 @@ Add `:e` behind password to mark it as encrypted. Use single quotes if using ter
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /host/share:/home/foo/share \
|
-v <host-dir>/share:/home/foo/share \
|
||||||
-p 2222:22 -d atmoz/sftp \
|
-p 2222:22 -d atmoz/sftp \
|
||||||
'foo:$1$0G2g0GSt$ewU0t6GXG15.0hWoOX8X9.:e:1001'
|
'foo:$1$0G2g0GSt$ewU0t6GXG15.0hWoOX8X9.:e:1001'
|
||||||
```
|
```
|
||||||
|
@ -105,9 +105,9 @@ Mount public keys in the user's `.ssh/keys/` directory. All keys are automatical
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /host/id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro \
|
-v <host-dir>/id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro \
|
||||||
-v /host/id_other.pub:/home/foo/.ssh/keys/id_other.pub:ro \
|
-v <host-dir>/id_other.pub:/home/foo/.ssh/keys/id_other.pub:ro \
|
||||||
-v /host/share:/home/foo/share \
|
-v <host-dir>/share:/home/foo/share \
|
||||||
-p 2222:22 -d atmoz/sftp \
|
-p 2222:22 -d atmoz/sftp \
|
||||||
foo::1001
|
foo::1001
|
||||||
```
|
```
|
||||||
|
@ -118,9 +118,9 @@ This container will generate new SSH host keys at first run. To avoid that your
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /host/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \
|
-v <host-dir>/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \
|
||||||
-v /host/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
|
-v <host-dir>/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
|
||||||
-v /host/share:/home/foo/share \
|
-v <host-dir>/share:/home/foo/share \
|
||||||
-p 2222:22 -d atmoz/sftp \
|
-p 2222:22 -d atmoz/sftp \
|
||||||
foo::1001
|
foo::1001
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue