From ebd64292fac2909917ea1096d55fa85f252dc74e Mon Sep 17 00:00:00 2001 From: jeff-h Date: Tue, 23 Feb 2021 12:27:54 +1300 Subject: [PATCH] Provide example SFTP_USERS usage. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4aa551a..0381716 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,20 @@ sftp: command: foo:pass:1001 ``` +Using the `SFTP_USERS` environment variable with multiple users: + +``` +sftp: + image: atmoz/sftp + volumes: + - /upload-one:/home/foo/upload + - /upload-two:/home/bar/upload + ports: + - "2222:22" + environment: + - SFTP_USERS=foo:pass1:1001 bar:pass2:1002 +``` + ### Logging in 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 OpenSSH client, run: `sftp -P 2222 foo@`