You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The entrypoint script tries to copy ssh configuration from /run/secrets/.ssh to /root/.ssh, but this breaks sometimes.
In my case, the files in /run/secrets/.ssh are mounted from a Kubernetes secret, and known_hosts and id_rsa are not regular files but symlinks to files in a hidden subdirectory:
Now because entrypoint does a cp -r /run/secrets/.ssh/* /root/.ssh, the symlinks are not dereferenced during copying, and the hidden directory ..2021_07_02_14_19_51.635251303 and the hidden symlink ..data are not included in the glob expansion. The result is a couple of broken symlinks in /root/.ssh.
This would be fixed by either dereferencing the symlinks during copying (cp -L), or copying the whole /run/secrets/.ssh directory instead of only its non-hidden contents.
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. I think I would be okay with just copying the whole directory (and adjusting the permissions). Are you able to create a PR for that?
The entrypoint script tries to copy ssh configuration from
/run/secrets/.ssh
to/root/.ssh
, but this breaks sometimes.In my case, the files in
/run/secrets/.ssh
are mounted from a Kubernetes secret, andknown_hosts
andid_rsa
are not regular files but symlinks to files in a hidden subdirectory:Now because
entrypoint
does acp -r /run/secrets/.ssh/* /root/.ssh
, the symlinks are not dereferenced during copying, and the hidden directory..2021_07_02_14_19_51.635251303
and the hidden symlink..data
are not included in the glob expansion. The result is a couple of broken symlinks in/root/.ssh
.This would be fixed by either dereferencing the symlinks during copying (
cp -L
), or copying the whole/run/secrets/.ssh
directory instead of only its non-hidden contents.The text was updated successfully, but these errors were encountered: