I was wondering if someone could shed some light on the issue im having,
Currently using this docker compose and its working fine but im not sure why when i upload content it does not show on the host, but in the container it shows correctly
Actually it’s not a question about sftp in docker. It is a question about how to use volumes with the markusmcnugen/sftp image properly.
You might want to reach out to the maintainer. If you don’t know how, just raise an issue in GitHub - MarkusMcNugen/docker-sftp: Fork of atmoz SFTP container built with Ubuntu and includes fail2ban and hope the maintainer responds (last commit was 2 years ago).
thanks for the reply, very odd because the volumes seems that are correctly configured im trying to find another docker image with fail2ban but i guess ill keep looking
ill post back to see how it goes
I wouldn’t be sure about that. You might want to exec into the container and actually check where the uploaded files are stored in the container. After reading the dockerhub description yesterday, I feel the description remains ambiguous about which container folders need to be mapped as volume. I wouldn’t be surprised if the data is written into the container file system, which would align with your experience.
hi there again, so after a while finally found sftp docker which does not lose the information and makes it persistent
the only thing i could not get it working is the defender, as it seems a bit different in docker
which i have this
docker run --name some-sftpgo \
-p 8080:8090 \
-p 2022:2022 \
--mount type=bind,source=/sql/jpg/sftpgodata,target=/srv/sftpgo \
--mount type=bind,source=/sql/jpg/sftpgohome,target=/var/lib/sftpgo \
-e SFTPGO_HTTPD__BINDINGS__0__PORT=8090 \
not sure to add another environment or setting up a json file
At least this image is up-to-date, and the documentation is clear about what folders need to be mapped as volume.
Though, I have no idea what the container does or doesn’t do with the default configuration and I can’t really help with function aspects of the configuration. Someone who actually uses this image might be able to do so.
If I were you, I would simply try it in the cycle: test, lookup required configuration in the documentation, apply configuration, restart the container, until the configuration allows everything needed.
Also, what is “the defender”?
Thank you for the reply, as reading a bit on the documentation everything is working great, just the defender part is the fail2ban part sftpgo/defender.md at main · drakkan/sftpgo · GitHub
in the docs say a bit of the configuration but does not show how to enable it