question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add utility to create a build context from a git repository.

See original GitHub issue

The reason is because it won’t work if you pass a private git repository as the build URL.

See docker/compose#2856 for more information, including a simple test-case by @zkf.

Instead, docker-py should follow the same steps as docker: if the build URL is a git repository, it should clone the repo locally and pass as a tarball to the daemon.

I believe the problem is caused by how docker-py performs a build (here) instead of following the same steps as docker.

Please let me know if I’m misunderstanding the problem or if there’s any other way I can help.

Here is my version information:

OS X El Capitan 10.11.2 (15C50)
docker-py==1.8.0.dev0
Python 2.7.9
Client:
 Version:      1.11.0-dev
 API version:  1.23
 Go version:   go1.6
 Git commit:   bc730f3-unsupported
 Built:        Tue Mar  8 19:01:29 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.0-dev
 API version:  1.23
 Go version:   go1.6
 Git commit:   bc730f3-unsupported
 Built:        Tue Mar  8 19:01:29 2016
 OS/Arch:      linux/amd64

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
kwidholm-tmcommented, Jun 25, 2018

The intent seems clear to me: There is neither any mention in that reference that using ssh git urls is an exceptional situation, nor that it an “upcoming feature”. Thus from reading those references alone users should expect regular git urls to “just work”. And if that expectation is not being met, then what we have is bug, not a missing feature.

My hope is that if this is escalated to being the bug that it is, it will be quashed more quickly. The last post on this thread was over half a year ago.

Just to say that I followed the threads to this thread due to having read the documentation and having run into this exact issue

$ docker-compose up
Building https-proxy
ERROR: error fetching: fatal: cannot run ssh: No such file or directory
fatal: unable to fork
: exit status 128

Documentation states this should work:

build: git@github.com:ORG_NAME/REPO.git

It does not.

The workarounds (github tokens + https) 1) only work for certain situations, and 2) still don’t allow docker compose /docker py to work as documented.

So I agree with @somombo here. We can blame the engine or docker.py. It doesn’t matter. In the end, the feature does not work as documented.

So perhaps the bug is in the documentation, and the documentation should be changed to reflect that building in docker compose via a private github repo over ssh is not supported. But I would imagine I would want to write feature parity between the two engines so they are interoperable.

1reaction
somombocommented, Oct 3, 2016

@apeace I agree that you should clarify the title of this thread as “SSH git URLs” instead of just “git URL”, because https urls seems to be working fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker build - Docker Documentation
When the URL parameter points to the location of a Git repository, the repository acts as the build context. The system recursively fetches...
Read more >
3 Different Ways to Provide Docker Build Context - CloudBees
In the example above, building from a Git repository. We simply use the Git repository URL as the context for the docker build...
Read more >
Contexts - GitHub Docs
About contexts. Contexts are a way to access information about workflow runs, runner environments, jobs, and steps. Each context is an object that...
Read more >
Creating build inputs | CI/CD | OpenShift Container Platform 4.9
A working directory is constructed and all input content is placed in the working directory. For example, the input Git repository is cloned...
Read more >
Continuous deployment from Git using Cloud Build
In the Service settings page, click Set up with Cloud Build. Select the provider and the repository. GitHub - if you are not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found