Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basically the info of the readme as a docker-compose.yml #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ or
docker run -d -p 2222:22 -v $(pwd)/.ssh/id_rsa.pub:/etc/authorized_keys/www -e SSH_USERS="www:48:48" docker.io/panubo/sshd:1.0.3
```

or use the provided docker-compose example file.

## Status

Production ready and stable.
28 changes: 28 additions & 0 deletions docker-compose-example-directories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3"

services:
sshd:
image: panubo/sshd
container_name: sshd
restart: always
ports:
- "2222:22"
volumes:
- "/your_data_directory/upload/:/data/upload/:rw"
- "/your_data_directory/download/:/data/download/:ro"

# SSH host keys to identity the server you are connecting to.
# To avoid receiving security warning the containers host keys can be persisted here.
- "/your_container_config_directory_directory/host_keys/:/etc/ssh/keys/"

# Put each user's key in user_keys/<username> and set SSH_USERS config to create user accounts below.
- "/your_container_config_directory_directory/user_keys/:/etc/authorized_keys/"

# Only needed without the SSH_USERS but with SSH_ENABLE_ROOT set.
# Will add the public key in your home as the key for the root user in the container.
# - "${HOME}/.ssh/id_rsa.pub:/root/.ssh/authorized_keys"

environment:
SSH_ENABLE_ROOT: "false"
SFTP_MODE: "true"
SSH_USERS: "root:1000:1000,userA:1001:1001,userB:1002:1002"