Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git ssh support #67

Merged
merged 2 commits into from
Dec 16, 2018
Merged

Add git ssh support #67

merged 2 commits into from
Dec 16, 2018

Conversation

leki75
Copy link
Contributor

@leki75 leki75 commented Nov 4, 2018

  • installed openssh-client and su-exec packages
  • added ssh key as a secret to the container
  • changed nobody user to katafygio to have a home directory for ssh keys
  • used entrypoint.sh to set ssh key and config at runtime

* installed openssh-client and su-exec packages
* added ssh key as a secret to the container
* changed nobody user to katafygio to have a home directory for ssh keys
* used entrypoint.sh to set ssh key and config at runtime
@coveralls
Copy link

coveralls commented Nov 4, 2018

Coverage Status

Coverage remained the same at 89.651% when pulling a7b5dc7 on leki75:master into 15a5d24 on bpineau:master.

@bpineau
Copy link
Owner

bpineau commented Nov 10, 2018

Thanks for submitting this @leki75!

The patch is correct, but changing the process uid would bite existing users having data.

Would you mind mouting the secrets with mountPath: "/.ssh" (as / is nobody's home) and settings securityContext.fsGroup: 65534?

That should be enough to consume ssh key from an unmodified image (except openssh-client package addition). As a bonus, secrets changes will propagate.

@leki75
Copy link
Contributor Author

leki75 commented Nov 29, 2018

Thank you for your comments! I have added a new commit where I do all the modifications you suggested. I was curious that mounting the secrets in /.ssh works and it does!

@MaxDiOrio
Copy link

When do we think this will be merged and available in Docker? This merge should allow using SSH to store the backups in AWS CodeCommit.

@bpineau bpineau merged commit bcc8625 into bpineau:master Dec 16, 2018
@bpineau
Copy link
Owner

bpineau commented Dec 16, 2018

Thanks for the PR and for your patience @leki75 !
@MaxDiOrio understood; I'll push a new release (including to Docker hub) today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants