Skip to content

Unable to fig build a github repo / works with docker build #491

Closed

Description

@techniq

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:

webapp:
  build: https://github.com/StrictlyBusiness/docker-java8.git

it shows Building webapp... then after ~40 seconds, it shows just a single closing bracket ). For example:

$ fig build
Building webapp...
)

I haven't found a way to get any more details on what's happening behind the scenes in fig to know why it's failing.

Activity

  1. 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
  2. dnephin commented on Sep 20, 2014

    @dnephin

    I've been able to reproduce this. It looks like the https:// is cauing a

    APIError: 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.yml to:

    webapp:
      build: github.com/StrictlyBusiness/docker-java8.git

    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).

  3. techniq commented on Sep 21, 2014

    @techniq
    Author

    @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).

  4. techniq commented on Sep 21, 2014

    @techniq
    Author

    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.

  5. dnephin commented on Sep 1, 2015

    @dnephin

    This is fixed by #1372 (which is still open)

  6. added this to the 1.5.1 milestone on Nov 3, 2015
  7. modified the milestones: 1.6.0, 1.5.1 on Nov 11, 2015
  8. modified the milestones: 1.5.2, 1.6.0 on Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions