You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to fig build a github repo / works with docker build #491
Using docker build I can pull and build an image directly from Github, for example: docker build -t java https://github.com/StrictlyBusiness/docker-java8.git
When I try to do the same using fig build and the following fig.yml:
changed the title [-]Unable to pull a github repo / works with docker build[/-][+]Unable to fig build a github repo / works with docker build[/+]on Sep 19, 2014
I think fig should probably also know how to strip the scheme (or at least emulate whatever the docker client is doing), and probably also handle these 500 errors better by reporting more details (that it was a 500 internal server error).
@dnephin - Removing the protocol fixed my simple case I had reported, but I'm running into a related issue trying to pull a private repo. I'm using a machine user with a personal access token with the url USERNAME:[email protected]/user/some-private-repo.git and it fails the same way. I'm not sure if this is more of a docker client issue, or something fig can help with (at least reporting better).
Also, stripping the protocol with the username:token url dumps the following stacktrace:
$ fig build
Building webapp...
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 30, in main
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 21, in sys_dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 31, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 24, in dispatch
File "/code/build/fig/out00-PYZ.pyz/fig.cli.command", line 50, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.docopt_command", line 27, in perform_command
File "/code/build/fig/out00-PYZ.pyz/fig.cli.main", line 115, in build
File "/code/build/fig/out00-PYZ.pyz/fig.project", line 161, in build
File "/code/build/fig/out00-PYZ.pyz/fig.service", line 366, in build
File "/code/build/fig/out00-PYZ.pyz/fig.packages.docker.client", line 354, in build
File "/code/build/fig/out00-PYZ.pyz/fig.packages.docker.utils.utils", line 48, in tar
File "/code/build/fig/out00-PYZ.pyz/tarfile", line 1979, in add
File "/code/build/fig/out00-PYZ.pyz/tarfile", line 1851, in gettarinfo
OSError: [Errno 2] No such file or directory: 'USERNAME:[email protected]/user/some-private-repo.git'
docker build https://USERNAME:[email protected]/user/some-private-repo.git (with the protocol) works fine btw.
Activity
[-]Unable to pull a github repo / works with docker build[/-][+]Unable to fig build a github repo / works with docker build[/+]dnephin commentedon Sep 20, 2014
I've been able to reproduce this. It looks like the
https://is cauing aAPIError: 500 Server Error: Internal Server Error (")").For some reason, the docker client either strips the https or knows how to deal with it.
If you change your
fig.ymlto:It will work.
I think fig should probably also know how to strip the scheme (or at least emulate whatever the docker client is doing), and probably also handle these 500 errors better by reporting more details (that it was a 500 internal server error).
techniq commentedon Sep 21, 2014
@dnephin - Removing the protocol fixed my simple case I had reported, but I'm running into a related issue trying to pull a private repo. I'm using a machine user with a personal access token with the url
USERNAME:[email protected]/user/some-private-repo.gitand it fails the same way. I'm not sure if this is more of a docker client issue, or something fig can help with (at least reporting better).techniq commentedon Sep 21, 2014
Also, stripping the protocol with the username:token url dumps the following stacktrace:
docker build https://USERNAME:[email protected]/user/some-private-repo.git(with the protocol) works fine btw.dnephin commentedon Sep 1, 2015
This is fixed by #1372 (which is still open)