Add option to mount host ssh agent (--ssh)#336
Add option to mount host ssh agent (--ssh)#336ohenning wants to merge 1 commit intodrone-plugins:masterfrom
Conversation
|
Hi @ohenning can you have a look at the failing checks on this one? We will have a look into this PR over the next few weeks (coming to end of quarter and have features to deliver!) to confirm it doesn't introduce any security vulnerabilities that we should be concerned about :) Thanks for your work on this! PS might also be worth a rebase! |
8cb5894 to
b85d92e
Compare
|
Hi @d1wilko , thanks for your feedback! Rebasing resolved the failing build! 👍 |
|
Hey, @d1wilko! Any new thoughts on this feature? I could benefit from it as well 😃 |
|
This is something we need for our drone builds, can you work at getting this merged @d1wilko ? |
|
Hey @ohenning Looks like the branch has conflicts? Can you merge master please? |
|
@jimsheldon @eoinmcafee00 I've addressed the merge conflicts in #369. Can someone take a look so we can get it merged in? |
|
Hey @ohenning Have you been able to verify this change works? This change expects the ability to mount the ssh directory which the docker plugin doesn't support. Can you provide some screenshots of this working, please? Also, it still seems to be complaining about conflicts. Cheers, |
|
I couldn't get this to work, fixes in #369 |
PR Purpose
This PR provides a new setting to the plugin:
ssh_agent-> Pass host ssh agent to the Image. Under the hood this triggers the--sshoption to be set when building the image (https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds).This get's really useful when it's required to access private repositories from inside the Image to build.
Additional Info
For this to work, it's necessary to have
DOCKER_BUILDKITenabled.Example:
drone.yamlDockerfilethe docker plugin documentation might have to be updated.