Giter Site home page Giter Site logo

docker / compose Goto Github PK

View Code? Open in Web Editor NEW
32.4K 719.0 5.1K 25.03 MB

Define and run multi-container applications with Docker

Home Page: https://docs.docker.com/compose/

License: Apache License 2.0

Shell 0.06% Dockerfile 2.17% Makefile 0.57% Go 96.83% HTML 0.06% HCL 0.30%
docker docker-compose orchestration go golang

compose's Introduction

Table of Contents

Docker Compose v2

GitHub release PkgGoDev Build Status Go Report Card Codecov OpenSSF Scorecard Docker Compose

Docker Compose is a tool for running multi-container applications on Docker defined using the Compose file format. A Compose file is used to define how one or more containers that make up your application are configured. Once you have a Compose file, you can create and start your application with a single command: docker compose up.

Where to get Docker Compose

Windows and macOS

Docker Compose is included in Docker Desktop for Windows and macOS.

Linux

You can download Docker Compose binaries from the release page on this repository.

Rename the relevant binary for your OS to docker-compose and copy it to $HOME/.docker/cli-plugins

Or copy it into one of these folders to install it system-wide:

  • /usr/local/lib/docker/cli-plugins OR /usr/local/libexec/docker/cli-plugins
  • /usr/lib/docker/cli-plugins OR /usr/libexec/docker/cli-plugins

(might require making the downloaded file executable with chmod +x)

Quick Start

Using Docker Compose is a three-step process:

  1. Define your app's environment with a Dockerfile so it can be reproduced anywhere.
  2. Define the services that make up your app in compose.yaml so they can be run together in an isolated environment.
  3. Lastly, run docker compose up and Compose will start and run your entire app.

A Compose file looks like this:

services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/code
  redis:
    image: redis

Contributing

Want to help develop Docker Compose? Check out our contributing documentation.

If you find an issue, please report it on the issue tracker.

Legacy

The Python version of Compose is available under the v1 branch.

compose's People

Contributors

aevesdocker avatar aiordache avatar arhemd avatar asaha123 avatar benjaminguzman avatar chris-crone avatar crazy-max avatar crosbymichael avatar dependabot-preview[bot] avatar dependabot[bot] avatar g0t4 avatar glours avatar gtardif avatar jhrotko avatar jsoriano avatar koditkarvedant avatar landism avatar laurazard avatar lorenrh avatar mat007 avatar metcalfc avatar milas avatar ndeloof avatar nicks avatar nicksieger avatar rumpl avatar tessaio avatar thajeztah avatar tymonx avatar ulyssessouza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compose's Issues

Ability to scale a service

I can't help but notice how much the fig.yml format looks like a dotcloud.yml or Procfile!

So... how about a "fig scale" command?

fig up should build on every invocation

Now Docker caches ADD in Dockerfiles, we can safely build on every fig up without builds taking ages.

There perhaps should also be an option in fig.yml to cache the build with a tag as it currently does. We should also document how to cache installation of code dependencies. E.g.:

ADD requirements.txt /code/
RUN pip install -r /code/requirements.txt
ADD . /code/

This means pip install will only be run when requirements.txt changes. If pip install were after the last line, it would be run anytime any file changed.

Getting ValueError: scheme unix is invalid

Getting this error when running docker v0.7.2. Here's the corresponding traceback:

Traceback (most recent call last):
  File "/usr/local/bin/fig", line 9, in <module>
    load_entry_point('fig==0.0.2', 'console_scripts', 'fig')()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 37, in main
    command.sys_dispatch()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 19, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 22, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 25, in perform_command
    handler(command_options)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 226, in up
    log_printer = LogPrinter(containers)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 13, in __init__
    self.generators = self._make_log_generators()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 26, in _make_log_generators
    generators.append(self._make_log_generator(container, color_fn))
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 32, in _make_log_generator
    websocket = self._attach(container)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 45, in _attach
    return container.attach_socket(params=params, ws=True)
  File "/usr/local/lib/python2.7/dist-packages/fig/container.py", line 131, in attach_socket
    return self.client.attach_socket(self.id, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 251, in attach_socket
    return self._attach_websocket(container, params)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 217, in _attach_websocket
    return self._create_websocket_connection(full_url)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 220, in _create_websocket_connection
    return websocket.create_connection(url)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 178, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 419, in connect
    hostname, port, resource, is_secure = _parse_url(url)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 141, in _parse_url
    raise ValueError("scheme %s is invalid" % scheme)
ValueError: scheme unix is invalid

Fig can't connect to DOCKER_HOST=tcp://

On OS X with boot2docker 0.5.4:

$ docker version
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
Server version: 0.8.0
Git commit (server): cc3a8c8
Go version (server): go1.2
$ ~/bin/boot2docker up
[2014-02-10 21:58:12] boot2docker-vm is already running.
$ echo $DOCKER_HOST
tcp://
$ fig --version
fig 0.2.1
$ fig up
Couldn't connect to Docker daemon at http:/ - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

docker build . worked fine for me, but fig seems unable to handle the tcp:// URL.

Plugin Support?

Are there any plans to support plugins?

Specifically, I'm considering replacing our Vagrant setup with Fig, and we use the salty-vagrant plugin.

It would be awesome if fig could do the equivalent of

vagrant plugin install vagrant-salt

Environment Variable Resolution?

I'd like to not change any of my env variable code in my app and be able to do something like this:

web:
  build: .
  ports:
   - 8000:8000
  links:
   - db
  environment:
   DATABASE_URL: mysql://user:password@${DB_1_PORT_3306_TCP_ADDR}/db
db:
  image: orchardup/mysql

Is there a way to do this currently with the linked ports? If not, is there any interest in this? I'd like to implement it there is a second person that would find it useful.

Couldn't connect to Docker daemon - you might need to run `docker-osx shell`.

Using boot2docker:

$ docker version
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
Server version: 0.8.0
Git commit (server): cc3a8c8
Go version (server): go1.2

$ fig version
fig 0.2.1

$ fig up
Building web...
Couldn't connect to Docker daemon - you might need to run `docker-osx shell`.

$ echo $DOCKER_HOST
tcp://localhost:4243

Any ideas?

Provide link aliases

I'm trying to use fig to assemble our application and have run into a use case that I don't see supported at the moment: I need to have a service that has 2 links to the same container, like so:

links:
  - db:db
  - db:legacydb

The reason is that in some environments those are 2 different containers but in a dev environment they're set up as one.

Is this something that is coming down the road for fig?

Command: Unable to locate source

command: source /.profile; source ~/.bashrc; bundle exec rackup -p 3000
➜ cliniko git:(fig) ✗ fig up web
Recreating cliniko_web_1...
Attaching to cliniko_web_1
cliniko_web_1 | 2014/01/23 02:08:07 Unable to locate source

I'm booting a centos 6.4 machine. I'm trying to overwrite the same command that is specified on Dockerfile. If I don't overwrite it, everything works as expected.

Fig got weird after removing Docker images

I started playing with Fig yesterday and when I wanted to start fresh today on project, I cleaned all Docker images (using docker rmi $(docker images -a -q)). I thought Fig would rebuild as it did yesterday, but no. After that, Fig was looking for an image that didn't exist.

Then I uninstalled Fig, Docker and even cleaned Docker folder inside /var/lib/Docker. But without success... Now web and db services build but don't work. Is there any place Fig store this info?

See: https://gist.github.com/pedroborges/0efe5f5e125bbddcdf07

Log output from Rails doesn't display when running fig up

± % fig up                                                                                  !73
Recreating myapp_db_1...
Recreating myapp_web_1...
Attaching to myapp_db_1, myapp_web_1
myapp_db_1 | 140122 13:07:06 [Note] /usr/sbin/mysqld: ready for connections.
myapp_db_1 | Version: '5.5.34-0ubuntu0.12.04.1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
myapp_web_1 |
myapp_web_1 |
myapp_web_1 |
myapp_web_1 |
myapp_web_1 |
myapp_web_1 |

fig logs works:

± % fig logs web                                                                            !71
Attaching to myapp_web_1
myapp_web_1 | => Booting Thin
myapp_web_1 | => Rails 3.2.16 application starting in development on http://0.0.0.0:3020
myapp_web_1 | => Call with -d to detach
myapp_web_1 | => Ctrl-C to shutdown server
myapp_web_1 | A server is already running. Check /code/tmp/pids/server.pid.
myapp_web_1 | Exiting

(Note that this is after I have run fig up.)

With 3+ services (1 linked) sometimes a service cannot be found.

Hello again,
This is a really odd bug I came across. I'm still not sure what causes it but I think it's linked to the third services name (and possibly the length?!).

Screencast of the bug happening.

In summary, when I had a fig.yml file setup to boot 3 services, like so..

web:                                                                                     
    build: .                                                                             
    links:                                                                               
        - redis                                                                          
redis:                                                                                   
    image: orchardup/redis                                                               
longNamedService:                                                                        
    build: .

I get an No such service: redis error when running fig up

But if I change the third services name to be really short, such as..

web:                                                                                     
    build: .                                                                             
    links:                                                                               
        - redis                                                                          
redis:                                                                                   
    image: orchardup/redis                                                               
l:                                                                                       
    build: .  

fig up works just fine! Really odd!

The project name should be configurable

Ideally in fig.yml (how do we have general config in there? maybe we need a top level services key?), but maybe in a separate .fig-project file or something.

Support docker files not named Dockerfile.

I'd like to be able to specify:

build: myfile.docker

Right now, this throws an error, even if there's a valid docker file at that path. Instead, it expects a directory with a file named Dockerfile. That's a good default, but it'd be nice the support pointing to files directly, also.

Epic: Use less disk space

There are a bunch of things we could do:

  • build -rm by default
  • run -rm by default when doing fig run
  • maybe remove containers by default if they don't have volumes?
  • pull latest tag by default #716

Examples of production deployment

I love how fig simplifies "development deployment / orchestration", but all systems eventually need to be deployed to a production environment, and I couldn't find any info on recommended ways to do that. My worry is of course having to use a completely different orchestration system for production.

It would be really useful to also have an example of how you can deploy to, e.g., Orchard or a Docker running on an AWS Ubuntu box - ideally, of course, reusing as much of the fig.yml orchestration info as possible.

If you DON'T want fig to be used for production deployment / orchestration, then it would be nice to say so up front. (And even nicer to point users to recommended projects for that.)

'ImportError: No module named compat'

I installed fig from source by running

$ sudo python setup.py install

and then when I run fig I get the following error

frank@franktop:~/src/fig$ fig
Traceback (most recent call last):
  File "/usr/local/bin/fig", line 9, in <module>
    load_entry_point('fig==0.0.2', 'console_scripts', 'fig')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 343, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2307, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2013, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/fig-0.0.2-py2.7.egg/fig/cli/main.py", line 12, in <module>
    from ..project import NoSuchService
  File "/usr/local/lib/python2.7/dist-packages/fig-0.0.2-py2.7.egg/fig/project.py", line 5, in <module>
    from .compat import cmp_to_key
ImportError: No module named compat

Any idea how to fix this?

$ python --version
Python 2.7.4
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

Rails Quickstart Fails

Following the directions for the Rails quick start, I get an error running fig:

$ fig run web rails new . --force --database=postgresql --skip-bundle
Traceback (most recent call last):
  File "/usr/local/bin/fig", line 9, in <module>
    load_entry_point('fig==0.2.0', 'console_scripts', 'fig')()
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/main.py", line 39, in main
    command.sys_dispatch()
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/command.py", line 24, in dispatch
    super(Command, self).dispatch(*args, **kwargs)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 24, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 27, in perform_command
    handler(command_options)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/main.py", line 215, in run
    container = service.create_container(one_off=True, **container_options)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 108, in create_container
    container_options = self._get_container_options(override_options, one_off=one_off)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 225, in _get_container_options
    container_options['name'] = self.next_container_name(one_off)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 199, in next_container_name
    return '_'.join(bits + [str(self.next_container_number(one_off=one_off))])
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 202, in next_container_number
    numbers = [parse_name(c.name)[2] for c in self.containers(stopped=True, one_off=one_off)]
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 38, in containers
    for container in self.client.containers(all=stopped):
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/packages/docker/client.py", line 399, in containers
    res = self._result(self._get(u, params=params), True)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/packages/docker/client.py", line 98, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 349, in request
    prep = self.prepare_request(req)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 287, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 287, in prepare
    self.prepare_url(url, params)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 338, in prepare_url
    "Perhaps you meant http://{0}?".format(url))
requests.exceptions.MissingSchema: Invalid URL u'localhost/v1.6/containers/json': No schema supplied. Perhaps you meant http://localhost/v1.6/containers/json?

It is not at all obvious to me what is causing this or where it is coming from. But I checked all files (and even copied the contents from the directions to make sure I had not fat-fingered anything), and the error persisted. All dependencies appeared to install correctly.

fig rails example doesnt work.

the postgresql database doesn't seem to start, nothing can connect:

fig run web rake db:create
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?

Also tried:
fig run db /usr/bin/psql -l
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

and

fig run db /usr/bin/psql -h 127.0.0.1
psql: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

Add support for registry authentication

I was having issues with the cert chain, so I followed what is on this thread for docker-osx: moby/moby#3683 . I'm able to do a docker login just fine using a new binary on mac os x.

However when using fig and having the Dockerfile pull from the same private registry I get the following error using fig build:

Step 1 : FROM ssl-repo.com/image
Pulling repository ssl-repo.com/image
Error: Authentication is required.

Does fig read the .dockercfg? Any other ideas on what the issue could be here?

`fig up` gives me `Couldn't connect to Docker daemon at http://172.16.42.43:4243 - is it running?`

The first time I ran fig up it worked perfectly. Now, for some strange reason it gives me:

Couldn't connect to Docker daemon at http://172.16.42.43:4243 - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

The VM is running and pinging 172.16.42.43 works fine. I've tried:

  • Rebooting
  • Removing the entry from my hosts file
  • Reinstalling fig
  • Rebuilding the OSX VM
  • sudo netstat -nltp on the VM itself, which gives me:
vagrant@packer-virtualbox:~$ sudo netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      676/rpcbind     
tcp        0      0 10.0.3.1:53             0.0.0.0:*               LISTEN      992/dnsmasq     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4389/sshd       
tcp        0      0 0.0.0.0:36730           0.0.0.0:*               LISTEN      710/rpc.statd   
tcp6       0      0 :::51915                :::*                    LISTEN      710/rpc.statd   
tcp6       0      0 :::111                  :::*                    LISTEN      676/rpcbind     
tcp6       0      0 fe80::fcf4:8eff:fed6:53 :::*                    LISTEN      992/dnsmasq     
tcp6       0      0 :::22                   :::*                    LISTEN      4389/sshd 

No exposed 4243 port. Anything obvious I'm missing? Something wrong with my conFIGuration?

Too short timeout interval

A timeout occurs while installing some packages via apt in a Ubuntu VM.

A possible solution would be to increase the timeout interval?

screenshot 2014-01-06 22 02 48

The output from the command is not logged out.

I noticed the output from commands (set either in a Dockerfile, or in fig.yml) does not currentlf log out.

Here is a simple example that might demonstrate what I mean more clearly.

For a simple fig.yml file

echo:
    image: ubuntu
    command: echo hello

The result from running fig up is

Creating FigExperiment_echo_1...
Attaching to FigExperiment_echo_1

But I think it would be incredibly useful if the command from the container is also outputted, e.g.

Creating FigExperiment_echo_1...
Attaching to FigExperiment_echo_1
hello 

I noticed that docker-py's client start and create_container don't support the attach option currently, so I'm not to sure how involved a fix this might be.

Proxy Service Ports

An interesting feature of Drone project is that they proxy services to the appropriate ports on the app machine so there's no faffing with ENV variables.

From their README:

NOTE: database and service containers are exposed over TCP connections and have their own local IP address. If the socat utility is installed inside your Docker image, Drone will automatically proxy localhost connections to the correct IP address.

Fig installation fails on Mac OS X

I'm trying to get fig running on Mac OS X (Mountain Lion). My versions:

Python 2.7.2
pip 1.5.2 from /Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg (python 2.7)
Vagrant 1.4.3
VirtualBox 4.3.7

When I try to do anything with fig, I get the following error:

$ fig
Traceback (most recent call last):
  File "/usr/local/bin/fig", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: six>=1.3.0

I tried making sure that six is installed and it appears to be:

$ sudo pip install -U six
Requirement already up-to-date: six in /Library/Python/2.7/site-packages

I tried installing fig again:

$ sudo pip install -U fig
Requirement already up-to-date: fig in /Library/Python/2.7/site-packages
Requirement already up-to-date: docopt==0.6.1 in /Library/Python/2.7/site-packages (from fig)
Requirement already up-to-date: PyYAML==3.10 in /Library/Python/2.7/site-packages (from fig)
Requirement already up-to-date: requests==2.2.1 in /Library/Python/2.7/site-packages (from fig)
Requirement already up-to-date: six>=1.3.0 in /Library/Python/2.7/site-packages (from fig)
Requirement already up-to-date: texttable==0.8.1 in /Library/Python/2.7/site-packages (from fig)
Requirement already up-to-date: websocket-client==0.11.0 in /Library/Python/2.7/site-packages (from fig)
Cleaning up...

six appears to be at the right version - in /Library/Python/2.7/site-packages I'm seeing six-1.5.2.dist-info

Not sure where to go from here? Any ideas?

[Proposal] Rewrite in go

First of all, thanks a lot for this awesome package and all the time you guys put into building it. I appreciate that a lot!

I'm aware my suggestion is kinda daring, nonetheless I want to put it up for discussion. Almost all docker related projects (and of course docker itself) are written in go-lang. boot2docker for example also takes this step. I think I don't have to list the advantages you have using go. But the main advantage in my opinion is that you don't have any dependencies such as pip.

As I said, this is just a suggestion. If you don't consider a rewrite in go, simply close this issue. I won't be sad 😺

Websockets scheme unix is invalid

➤ sudo fig up
Attaching to wp_mysql_1, wp_web_1
Traceback (most recent call last):
  File "/usr/local/bin/fig", line 9, in <module>
    load_entry_point('fig==0.0.2', 'console_scripts', 'fig')()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 39, in main
    command.sys_dispatch()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 24, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 27, in perform_command
    handler(command_options)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 228, in up
    log_printer = LogPrinter(containers)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 15, in __init__
    self.generators = self._make_log_generators()
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 28, in _make_log_generators
    generators.append(self._make_log_generator(container, color_fn))
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 34, in _make_log_generator
    websocket = self._attach(container)
  File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 47, in _attach
    return container.attach_socket(params=params, ws=True)
  File "/usr/local/lib/python2.7/dist-packages/fig/container.py", line 133, in attach_socket
    return self.client.attach_socket(self.id, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 251, in attach_socket
    return self._attach_websocket(container, params)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 217, in _attach_websocket
    return self._create_websocket_connection(full_url)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 220, in _create_websocket_connection
    return websocket.create_connection(url)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 178, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 419, in connect
    hostname, port, resource, is_secure = _parse_url(url)
  File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 141, in _parse_url
    raise ValueError("scheme %s is invalid" % scheme)
ValueError: scheme unix is invalid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.