Add utility to create a build context from a git repository.
See original GitHub issueThe 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:
- Created 8 years ago
- Comments:20 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to say that I followed the threads to this thread due to having read the documentation and having run into this exact issue
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.
@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.