-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
docker is unable to build private git repository with ssh access using buildkit #1035
Comments
I'm also experiencing the same issue but with Concourse CI (vito/oci-build-task). |
@Bluesboy no I just don't use Buildkit for this repositories. |
The workaround is to do We do plan to add proper support for this #1048 |
It seems to me that error happened because buildkit doesn't interpolates environment variables from host inside build environment. However if I provide variables with ARG directive in Dockerfile and then specify them in build arguments everything works fine. Hope that'll help somebody. |
@alexcb I guess this has been addressed but can you update documentation for the extra |
@tonistiigi I think I might be missing something here, which struct/fields needs documenting? I'm surprised that this code isn't being triggered automatically: https://github.com/moby/buildkit/blob/master/client/llb/source.go#L292-L310 |
@alexcb I'd assume at least |
I just compiled a new version of buildx, and if I specify a socket it works:
however when I run it without any I wonder if something like this would be a reasonable fix? docker/buildx#577 edit: this is a simpler fix: docker/buildx#578 |
I'm having the save error. Anyone got this working with buildkit? |
Problem:
If you have a private git repository you access using ssh key, you are not able to build it using buildkit.
export DOCKER_BUILDKIT=1 ; docker build [email protected]:xxxx/yyyy.git
fails with permission denied, Could not read from remote repository...Of course the normal build command is working as expected:
export DOCKER_BUILDKIT=0 ; docker build [email protected]:xxxx/yyyy.git
Expected behavior:
export DOCKER_BUILDKIT=1 ; docker build [email protected]:xxxx/yyyy.git
should be able to use ssh key or ssh-agent in order to download the private project and then build the project.Docker version:
The text was updated successfully, but these errors were encountered: