When I tried it locally on my winSCP to check sftp is working or not it gives connection error.
I need an sftp container in which I can mount at least two volumes. I also need to be able to create user which then have sftp access to the seperate volumes. so user1 only has access to volume1 and user2 has only access to volume2. Also I dont want to make users in docker compose file directly, rather to use it later from other files of project.
Note: I am using windows operating system, and new to docker field.
Docker-compose.yml:
version: '3'
services:
my-linux-container:
image: ubuntu:latest
command: /bin/bash -c "apt-get update && apt-get install -y openssh-server && service ssh start && tail -f /dev/null"
ports:
- "2235:22"
sftp:
image: atmoz/sftp
volumes:
- ./data:/home/user1
- ./data:/home/user2
ports:
- "2234:22"
environment:
SFTP_USERS: "user1:pass:1001:1001:/home/user1, user2:passd:1002:1002:/home/user2"