Open JulienKyu opened 5 years ago
I would guess that it's a permission error. What permissions do both your key files have? They need have to have 600 (u+rw) and be owned by root
Can you try replacing the relative paths in your docker compose file? Replace this
volumes:
- ./ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key
- ./ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key
with
volumes:
- ${PWD}/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key
- ${PWD}/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key
or make the path absolte by providing the full path, e.g. /home/user/.ssh/ ...
I solved this problem by creating a volum of the folder ssh:
And in the folder /home/foo/sshkey leave the following files:
I had a similar problem on CircleCI, because their 'docker executor' does not allow mounting volumes.
I solved it by building a bespoke image. The image is based on atmoz/sftp
and just copies my config files copied over.
To accomplish that with docker-compose is easy:
# docker-compose.yml
services:
sftp:
build: ./sftp
command: foo:pass:::upload
# sftp/Dockerfile
FROM atmoz/sftp:alpine-3.7
COPY ./ssh_host_* /etc/ssh/
RUN chmod 600 /etc/ssh/ssh_host_*
Hi everyone,
I dont found where is my problem.... please help me if you can
This is my docker-compose file
And this my output
If I remove ed25519 line in volume array, I got this error:
The container shut down instantly after error... I dont understand why ? I doesn't found any post who talking about these errors.
Thanks you for your help Julien