From c6285fe34c64632c2015c9cd51aaedc51eeaa1f8 Mon Sep 17 00:00:00 2001 From: Adrian Dvergsdal Date: Sun, 12 Jul 2020 23:21:00 +0200 Subject: [PATCH] Make host dir more clear See #224 --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2a0afbe..cde07cc 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Let's mount a directory and set UID: ``` docker run \ - -v /host/upload:/home/foo/upload \ + -v /upload:/home/foo/upload \ -p 2222:22 -d atmoz/sftp \ foo:pass:1001 ``` @@ -58,7 +58,7 @@ docker run \ sftp: image: atmoz/sftp volumes: - - /host/upload:/home/foo/upload + - /upload:/home/foo/upload ports: - "2222:22" 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 \ - -v /host/users.conf:/etc/sftp/users.conf:ro \ + -v /users.conf:/etc/sftp/users.conf:ro \ -v mySftpVolume:/home \ -p 2222:22 -d atmoz/sftp ``` -/host/users.conf: +/users.conf: ``` 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 \ - -v /host/share:/home/foo/share \ + -v /share:/home/foo/share \ -p 2222:22 -d atmoz/sftp \ '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 \ - -v /host/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/share:/home/foo/share \ + -v /id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro \ + -v /id_other.pub:/home/foo/.ssh/keys/id_other.pub:ro \ + -v /share:/home/foo/share \ -p 2222:22 -d atmoz/sftp \ foo::1001 ``` @@ -118,9 +118,9 @@ This container will generate new SSH host keys at first run. To avoid that your ``` docker run \ - -v /host/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \ - -v /host/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \ - -v /host/share:/home/foo/share \ + -v /ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \ + -v /ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \ + -v /share:/home/foo/share \ -p 2222:22 -d atmoz/sftp \ foo::1001 ```