I have an app that generates log files. My idea is to make SFTP docker container, mount my folder where i save logs and access them via FileZilla. I am able to create container with this compose file:
version: "3.8"
services:
sftp-server:
image: emberstack/sftp
environment:
- USERS=demo:demo:1001:1001
expose:
- "22"
volumes:
- ../wedofinance-backend/logs:/sftp
ports:
- "22:22"
networks:
wedofinance-network:
When i access my docker container with:
`docker exec -it docker-sftp-server-1 /bin/bash`
and then:
'ls /sftp'
i am able to see all my folders:
If i go and add some folder/file to my folder that i mounted, in this case folder 'test':
i am able to see it in my container without having to restart it. Running ls after creating 'test' folder shows that test folder is visible from container:
The problem is when i try to access my folders and files remotely via FileZilla or WinSCP i am not able to see those folders/files:
I tried Server->Force Showing Hidden Files but to no success.
It is worth mentioning that i use SFTP in my FileZilla connection settings.
Any help would be much appreciated as i am new to the dockers and file transfer protocols.




Ok, after some time i noticed that in my container i only had sftp folder because that is where i mounted my logs folder in my docker-compose file and that was the folder where all my files were stored but fileZilla and WinSCP were accessing home/demo/sftp and that folder was empty. After i changed my compose file to:
i was able to see and download my log files.