4

Setup:

  • Windows 7
  • Docker v1.6.0, installed as part of Boot2docker
  • Docker-compose v1.2.0

I installed docker-compose using pip:

pip install docker-compose

And it seemed to install successfully. However, when I try to run: docker-compose up in the directory in which I have my docker-compose.yml definition, I get the following exception:

Traceback (most recent call last):
  File "c:\Python27\Scripts\docker-compose-script.py", line 9, in <module>
    load_entry_point('docker-compose==1.2.0', 'console_scripts', 'docker-compose
')()
  File "c:\Python27\lib\site-packages\pkg_resources.py", line 351, in load_entry
_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\Python27\lib\site-packages\pkg_resources.py", line 2363, in load_entr
y_point
    return ep.load()
  File "c:\Python27\lib\site-packages\pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "c:\Python27\lib\site-packages\compose\cli\main.py", line 11, in <module>

    import dockerpty
  File "c:\Python27\lib\site-packages\dockerpty\__init__.py", line 17, in <modul
e>
    from dockerpty.pty import PseudoTerminal
  File "c:\Python27\lib\site-packages\dockerpty\pty.py", line 21, in <module>
    import dockerpty.io as io
  File "c:\Python27\lib\site-packages\dockerpty\io.py", line 18, in <module>
    import fcntl
ImportError: No module named fcntl

I understand from different posts unrelated to docker that this error is thrown because fcntl is linux native and, obviously, my python windows distribution is missing it. However, the workarounds the people there specified don't necessarily apply to my personal case.

I also tried the steps here: https://github.com/docker/compose/releases

I downloaded the linux archive using curl (had no uname resolution) and gave execution right, but still:

$ docker-compose -version
./docker-compose: ./docker-compose: cannot execute binary file

Is anyone aware of any workarounds / actually functional ways of installing docker-compose on a Boot2docker VM?

Cristina_eGold
  • 1,463
  • 2
  • 22
  • 41
  • I have edited [my answer below](http://stackoverflow.com/a/29981591/6309), after Ed's feedback: installing docker-compose directly in boot2docker (instead of trying to run it in a container) seems the more robust solution. See [all the details here](http://stackoverflow.com/a/29728993/6309) – VonC Jun 08 '15 at 15:59

1 Answers1

3

You can run docker compose on boot2docker Windows.
You can install docker compose in a container directly in boot2docker and use it that way.

See "How to install docker-compose on Windows and issue 1085.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you for the response. However, when trying to run `dc up`, I encounter the following error: invalid value "C:\\Program Files (x86)\\Git\\var\\run\\docker.sock;C:\\Program iles (x86)\\Git\\var\\run\\docker.sock" for flag -v: \Program Files (x86)\Git\v r\run\docker.sock;C:\Program Files (x86)\Git\var\run\docker.sock is not an absolute path And that path doesn't even exist... I already had a git client, so I did not install the bundled one. Might that be the cause? Any words of advice? – Cristina_eGold May 01 '15 at 11:19
  • @deepdownunder2222 are you defining your alias (and running `dc`) in the bash boot2docer session (the one you see after doing a `boot2docker ssh`)? – VonC May 01 '15 at 11:22
  • You are completely right. That was it, it is working perfectly now. Thank you very much! – Cristina_eGold May 01 '15 at 11:28