iamdork / compose

Command line replacement for docker-compose, adding dork magics.
MIT License
2 stars 2 forks source link

Ubuntu 17.04 compatibility #51

Closed ohthehugemanatee closed 7 years ago

ohthehugemanatee commented 7 years ago

Steps to reproduce

(on a clean install of Ubuntu 17.04) 1) install docker-ce per the official instructions. Note that apparently no one bothered to rename the docker.io package to docker-ce on their Zesty repo, so you may have to install docker.io instead. 2) install dork-compose and docker-compose with sudo apt install -y python-pip && pip install dork-compose 3) dork-compose up -d --build on your favorite dork project.

Expected behavior

containers start normally.

Actual behavior

Traceback (most recent call last):
  File "/usr/local/bin/dork-compose", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/dist-packages/dork_compose/main.py", line 58, in run
    compose.cli.main.main()
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 88, in main
    command()
  File "/usr/local/lib/python2.7/dist-packages/dork_compose/injections.py", line 50, in dork_perform_command
    return perform_command(options, handler, command_options)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 140, in perform_command
    handler(command, command_options)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 872, in up
    remove_orphans=remove_orphans)
  File "/usr/local/lib/python2.7/dist-packages/dork_compose/injections.py", line 249, in up
    containers = super(DorkProject, self).up(service_names, start_deps, strategy, do_build, timeout, detached, remove_orphans)
  File "/usr/local/lib/python2.7/dist-packages/compose/project.py", line 381, in up
    self.initialize()
  File "/usr/local/lib/python2.7/dist-packages/compose/project.py", line 425, in initialize
    self.networks.initialize()
  File "/usr/local/lib/python2.7/dist-packages/dork_compose/injections.py", line 211, in initialize
    super(DorkNetworks, self).initialize()
  File "/usr/local/lib/python2.7/dist-packages/compose/network.py", line 203, in initialize
    network.ensure()
  File "/usr/local/lib/python2.7/dist-packages/compose/network.py", line 59, in ensure
    data = self.inspect()
  File "/usr/local/lib/python2.7/dist-packages/compose/network.py", line 91, in inspect
    return self.client.inspect_network(self.full_name)
  File "/home/ohthehugemanatee/.local/lib/python2.7/site-packages/docker/utils/decorators.py", line 35, in wrapper
    return f(self, *args, **kwargs)
  File "/home/ohthehugemanatee/.local/lib/python2.7/site-packages/docker/api/network.py", line 180, in inspect_network
    return self._result(res, json=True)
  File "/home/ohthehugemanatee/.local/lib/python2.7/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/home/ohthehugemanatee/.local/lib/python2.7/site-packages/docker/api/client.py", line 214, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 862, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localunixsocket/v1.22/networks/drupal_default

Other notes

ohthehugemanatee commented 7 years ago

fwiw I replicated this on a fresh digitalocean droplet.

pmelab commented 7 years ago

I just updated to docker-compose 1.13.0 and tested on 17.04 and everything went fine. Could you test again, using the latest version on pip?

ohthehugemanatee commented 7 years ago

this solved the reported issue, thanks!