Skip to content

Add ssh to build#234

Merged
ndeloof merged 8 commits intocompose-spec:masterfrom
glours:add-ssh-to-build
Mar 9, 2022
Merged

Add ssh to build#234
ndeloof merged 8 commits intocompose-spec:masterfrom
glours:add-ssh-to-build

Conversation

@glours
Copy link
Contributor

@glours glours commented Mar 2, 2022

What this PR does / why we need it:
Introduce ssh attribute to the build section.
This allows the usage of SSH authentification when building an image (i.e., cloning a private repo...)

Which issue(s) this PR fixes:
This PR is part of the #233 proposal

@glours glours self-assigned this Mar 2, 2022
@glours glours requested review from EricHripko, ndeloof and ulyssessouza and removed request for EricHripko, ndeloof and ulyssessouza March 2, 2022 14:50
Copy link
Collaborator

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some minor notes

@zaucker
Copy link

zaucker commented Mar 4, 2022

Do I understand this correctly? This PR just adds the possibility to specify --ssh in the build section of the docker-compose file, but does not yet pass that to the build command upon running docker-compose build?
Just wondering if for my current project I can expect this to become functional soon or if I better don't count on it for the time being.

@glours
Copy link
Contributor Author

glours commented Mar 4, 2022

@zaucker adding the flag to the docker compose build command will be done when we'll implement this specification change in Compose

@ndeloof
Copy link
Collaborator

ndeloof commented Mar 4, 2022

implementation in docker/commose should not be a big deal, as we can rely on previous implementation by buildx bake as extension fields.

glours added 4 commits March 4, 2022 16:53
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
…ebacks

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
@glours glours force-pushed the add-ssh-to-build branch from 4224b25 to 1d009e7 Compare March 4, 2022 17:12
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
build.md Outdated
build:
context: .
ssh:
default # mount the default ssh agent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default # mount the default ssh agent
- default # mount the default ssh agent

or

   [default]

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
@glours glours force-pushed the add-ssh-to-build branch from 743ccca to 8b21d37 Compare March 8, 2022 14:00
Copy link
Collaborator

@EricHripko EricHripko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome ✅ Overjoyed to see SSH support coming to Compose 🙌 I've left a typo fix and some non-blocking comments inline. Feel free to land once the former is addressed.

@glours
Copy link
Contributor Author

glours commented Mar 8, 2022

Thank you so much @EricHripko for your review, will address you comments before merging

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
@ndeloof ndeloof merged commit e13d6e4 into compose-spec:master Mar 9, 2022
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.

6 participants