git-server-docker icon indicating copy to clipboard operation
git-server-docker copied to clipboard

Every container started with this image has the same key

Open mvachhar opened this issue 6 years ago • 2 comments

https://github.com/jkarlosb/git-server-docker/blob/72f69a5d6b8e719d0c8120f076097a27100ed366/Dockerfile#L14

Are you sure you don't want to do this conditionally in start.sh? With this, every container created with this image will have the same ssh host key which is bad.

mvachhar avatar Jun 22 '18 20:06 mvachhar

and recreating the docker container also means that the host keys are regenerated, since they are not exposed in volume to make them persistent.

belsander avatar Nov 26 '18 14:11 belsander

Seems like it can be easily modified to move the host keys to /etc/ssh/host_keys and have the option to mount it as a volume. If the files don't exist, generate them, else leave them alone. I'm in the process of doing this with my fork.

wishbone51 avatar Feb 01 '22 18:02 wishbone51