Replies: 1 comment 2 replies
-
You are modifying the Docker The code replicating your return new GenericContainer<>(DockerImageName.parse("atmoz/sftp:latest"))
.withExposedPorts(22) // this will map to a dynamic port on the host
.withCopyFileToContainer(MountableFile.forHostPath("/id_rsa.pub"),
"/home/foo/.ssh/keys/id_rsa.pub")
.withCopyFileToContainer(MountableFile.forHostPath("/id_other.pub"),
"/home/foo/.ssh/keys/id_rsa.pub")
.withCopyFileToContainer(MountableFile.forHostPath("/share"), // this won't sync the files from within the container back to the host
"/home/foo/share")
.withCommand("foo::1001"); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i'm working with atmoz/sftp
I would mount my own host keys as described:
docker run
-v /id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro
-v /id_other.pub:/home/foo/.ssh/keys/id_other.pub:ro
-v /share:/home/foo/share
-p 2222:22 -d atmoz/sftp
foo::1001
i try with:
but it doesn't work.
help!!!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions