Skip to content

Instantly share code, notes, and snippets.

@emilisto
Last active August 29, 2015 14:16
Show Gist options
  • Save emilisto/a1509d6c0ed2b37ae5a3 to your computer and use it in GitHub Desktop.
Save emilisto/a1509d6c0ed2b37ae5a3 to your computer and use it in GitHub Desktop.
Annoying docker-compose bug
test:
image: ubuntu:precise
command: /bin/sh

I only get this problem when running boot2docker on OS X, so start by starting the boot2docker VM and setting up your shell (running $(boot2docker shellinit)).

  1. Add docker-compose.yml with the above contents to CWD
  2. Run:
$ docker-compose run test ls /
bin   dev  home  lib64  mnt  proc  run   selinux  sys  usr
boot  etc  lib   media  opt  root  sbin  srv      tmp  var
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 9, in <module>
    load_entry_point('docker-compose==1.1.0', 'console_scripts', 'docker-compose')()
  File "/usr/local/lib/python2.7/site-packages/compose/cli/main.py", line 31, in main
    command.sys_dispatch()
  File "/usr/local/lib/python2.7/site-packages/compose/cli/docopt_command.py", line 21, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "/usr/local/lib/python2.7/site-packages/compose/cli/command.py", line 27, in dispatch
    super(Command, self).dispatch(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/compose/cli/docopt_command.py", line 24, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "/usr/local/lib/python2.7/site-packages/compose/cli/command.py", line 59, in perform_command
    handler(project, command_options)
  File "/usr/local/lib/python2.7/site-packages/compose/cli/main.py", line 341, in run
    dockerpty.start(project.client, container.id, interactive=not options['-T'])
  File "/usr/local/lib/python2.7/site-packages/dockerpty/__init__.py", line 27, in start
    PseudoTerminal(client, container, interactive=interactive).start()
  File "/usr/local/lib/python2.7/site-packages/dockerpty/pty.py", line 151, in start
    self._hijack_tty(pumps)
  File "/usr/local/lib/python2.7/site-packages/dockerpty/pty.py", line 235, in _hijack_tty
    if any([p.flush() is None for p in ready]):
  File "/usr/local/lib/python2.7/site-packages/dockerpty/io.py", line 285, in flush
    return self.to_stream.write(self.from_stream.read(n))
  File "/usr/local/lib/python2.7/site-packages/dockerpty/io.py", line 119, in read
    return self.fd.recv(n)
  File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 183, in recv
    data = self.connection.recv(*args, **kwargs)
OpenSSL.SSL.ZeroReturnError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment