ERROR: Bad Response from Docker Engine

Expected behavior

docker-compose -p ${RANDOM_ID} -f docker-compose.test.yml run --rm web make test should not throw the error ERROR: Bad response from Docker engine intermittently.

Actual behavior

docker-compose -p ${RANDOM_ID} -f docker-compose.test.yml run --rm web make test randomly results in ERROR: Bad response from Docker engine.

Information

This is not an issue when running docker within an ubuntu VM, it appears to only be occurring when I use Docker for Mac.

Our test process is to build the containers first
docker-compose -p ${RANDOM_ID} build base mysql postgres > /dev/null
Then run the tests
docker-compose -p ${RANDOM_ID} -f docker-compose.test.yml run --rm web make test

Then we have an exit trap for tearing down the containers (which is defined above the above code)

function remove_the_containers {
    docker-compose -p ${RANDOM_ID} -f docker-compose.test.yml down -v > /dev/null
}
trap remove_the_containers EXIT
  • OSX 10.11.3
  • Version 1.11.1-beta13 (build: 7975) 16dbe555c7dd4304521b21e8286d83fe4864c15c
    Note:
  • I also saw this issue in the previous beta build, itā€™s not new to this one. Iā€™m just now getting around to reporting it.

Steps to reproduce the behavior

Not sure. Itā€™s completely random. How can I get better insight into why Iā€™m getting this generic error? Maybe this is an issue with how our compose files are setup. Not sure, but I donā€™t know how to find more information and I havenā€™t found anything similar via googling.

1 Like

Also seeing this with 1.11.1-beta13.

Iā€™m also experiencing this with Version 1.11.1-beta13.1 (build: 8193)

For me this can be reliably produced.

  • Version 1.11.1-beta13.1 (build: 8193) e9f58bbe60f0debccc097b7d27cad200556ec6f5
  • OSX 10.10.5

The compose file has a mariadb container, and an alpine-based custom built container. The built container is linked to the db container, itā€™s purpose is to run a maven build.

The container is already built when running these commands:

$ docker-compose run build
Creating network "project_default" with the default driver
Creating project_db_1
ERROR: Bad response from Docker engine

However, (after using down to cleanup):

$ docker-compose up -d db
Creating network "project_default" with the default driver
Creating project_db_1
$ docker-compose run build
# ... works as normal

Also, after the failure, re-running the run command immediately will work as normal. It appears to just be the transition from up-ing the linked service to creating the ā€˜buildā€™ container.

Docker logs (Console) are not showing any differences between run build and up -d db.

@gktheone I just did the same and get the same results. Thanks for the workaround.

Previously we did not use up -d for bringing up our dbs. Now with that in place it is consistently working.

docker-compose -p ${PROJECT} -f docker-compose.test.yml build web mysql postgres > /dev/null
docker-compose -p ${PROJECT} -f docker-compose.test.yml up -d mysql postgres > /dev/null
docker-compose -p ${PROJECT} -f docker-compose.test.yml run --rm web make test

@dockersupport Iā€™ve uploaded my diagnostic report - 6818AA2B-D8AC-427B-B6B7-84C20EFD37BA. The very last docker command I ran failed with Bad response from Docker engine when I removed the second line from the above snippet.

Having very similar issues. Running Docker for Mac beta version 1.11.1-beta14 (build: 8670) on OS X 10.11.5 (15F34), which was freshly installed today.

Hereā€™s a failing docker-compose run with verbose mode on:

$ docker-compose -f docker-compose.yml -p buildkitec5b98706b9db4c8eabee424c117d2f91 --verbose build --pull app
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.auth.load_config: File doesn't exist
compose.cli.command.get_client: docker-compose version 1.7.1, build 0a9ab35
docker-py version: 1.8.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1j 15 Oct 2014
compose.cli.command.get_client: Docker base_url: http+docker://localunixsocket
compose.cli.command.get_client: Docker version: KernelVersion=4.4.11-moby, Os=linux, BuildTime=2016-06-03T08:34:52.695511840+00:00, ApiVersion=1.23, Version=1.11.1, GitCommit=8b63c77, Arch=amd64, GoVersion=go1.5.4
compose.service.build: Building app
compose.cli.verbose_proxy.proxy_callable: docker build <- (pull=True, stream=True, nocache=False, tag=u'buildkitec5b98706b9db4c8eabee424c117d2f91_app', buildargs=None, rm=True, forcerm=False, path='/Users/sj26/Library/Buildkite/hooks/test-2/test/test', dockerfile=None)
docker.api.build._set_auth_headers: Looking for auth config
docker.api.build._set_auth_headers: No auth config in memory - loading from filesystem
docker.auth.auth.load_config: File doesn't exist
docker.api.build._set_auth_headers: No auth config found
compose.cli.verbose_proxy.proxy_callable: docker build -> <generator object _stream_helper at 0x104404640>
Step 1 : FROM ubuntu
latest: Pulling from library/ubuntu
 
5ba4f30e5bea: Already exists
9d7d19c9dc56: Already exists
ac6ad7efd0f9: Already exists
e7491a747824: Already exists
Digest: sha256:46fb5d001b88ad904c5c732b086b596b92cfb4a4840a3abd0e35dbb6870585e4
Status: Image is up to date for ubuntu:latest
 ---> 2fa927b5cdd3
Step 2 : VOLUME /app
 ---> Using cache
 ---> 40c2bdeb5777
Step 3 : WORKDIR /app
 ---> Using cache
 ---> bce83213ad4a
Successfully built bce83213ad4a
compose.cli.verbose_proxy.proxy_callable: docker close <- ()
compose.cli.verbose_proxy.proxy_callable: docker close -> None

$ docker-compose -f docker-compose.yml -p buildkitec5b98706b9db4c8eabee424c117d2f91 --verbose run app ./command
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.auth.load_config: File doesn't exist
compose.cli.command.get_client: docker-compose version 1.7.1, build 0a9ab35
docker-py version: 1.8.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1j 15 Oct 2014
compose.cli.command.get_client: Docker base_url: http+docker://localunixsocket
compose.cli.command.get_client: Docker version: KernelVersion=4.4.11-moby, Os=linux, BuildTime=2016-06-03T08:34:52.695511840+00:00, ApiVersion=1.23, Version=1.11.1, GitCommit=8b63c77, Arch=amd64, GoVersion=go1.5.4
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- (u'buildkitec5b98706b9db4c8eabee424c117d2f91_default')
compose.network.ensure: Creating network "buildkitec5b98706b9db4c8eabee424c117d2f91_default" with the default driver
compose.cli.verbose_proxy.proxy_callable: docker create_network <- (ipam=None, driver=None, options=None, name=u'buildkitec5b98706b9db4c8eabee424c117d2f91_default')
compose.cli.verbose_proxy.proxy_callable: docker create_network -> {u'Id': u'54a71b9f9d250b7152dda667854ad716442cb0048e7c895e4d5b184f2ad4c0ca',
 u'Warning': u''}
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=redis', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=db', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('redis')
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'redis-server'],
             u'Domainname': u'',
             u'Entrypoint': [u'docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('postgres')
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'postgres'],
             u'Domainname': u'',
             u'Entrypoint': [u'/docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/lib/postgresql/9.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=redis', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=db', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.parallel.feed_queue: Pending: set([<Service: redis>, <Service: db>])
compose.parallel.feed_queue: Starting producer thread for <Service: redis>
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('redis')
compose.parallel.feed_queue: Starting producer thread for <Service: db>
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('postgres')
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'redis-server'],
             u'Domainname': u'',
             u'Entrypoint': [u'docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=redis', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'postgres'],
             u'Domainname': u'',
             u'Entrypoint': [u'/docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/lib/postgresql/9.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=db', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('redis')
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('postgres')
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'postgres'],
             u'Domainname': u'',
             u'Entrypoint': [u'/docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/lib/postgresql/9.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'redis-server'],
             u'Domainname': u'',
             u'Entrypoint': [u'docker-entrypoint.sh'],
             u'Env': [u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.service.build_container_labels: Added config hash: ebf3fee0ea4d13e14b56da2d5938dd1edb25e8e25bbcdf5c89185104ba88b78c
compose.service.build_container_labels: Added config hash: 633502eb025c2e369569317e26f222328952f89316c4b0e2120f1b2a7ffbf9e9
compose.cli.verbose_proxy.proxy_callable: docker create_host_config <- (memswap_limit=None, links=[], devices=None, pid_mode=None, log_config={'Type': u'', 'Config': {}}, cpu_quota=None, read_only=None, dns=None, volumes_from=[], port_bindings={}, security_opt=None, extra_hosts=None, cgroup_parent=None, network_mode=u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', shm_size=None, tmpfs=None, cap_add=None, restart_policy=None, dns_search=None, privileged=False, binds=[], ipc_mode=None, mem_limit=None, cap_drop=None, ulimits=None)
compose.cli.verbose_proxy.proxy_callable: docker create_host_config <- (memswap_limit=None, links=[], devices=None, pid_mode=None, log_config={'Type': u'', 'Config': {}}, cpu_quota=None, read_only=None, dns=None, volumes_from=[], port_bindings={}, security_opt=None, extra_hosts=None, cgroup_parent=None, network_mode=u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', shm_size=None, tmpfs=None, cap_add=None, restart_policy=None, dns_search=None, privileged=False, binds=[], ipc_mode=None, mem_limit=None, cap_drop=None, ulimits=None)
compose.cli.verbose_proxy.proxy_callable: docker create_host_config -> {'Binds': [],
 'Links': [],
 'LogConfig': {'Config': {}, 'Type': u''},
 'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default',
 'PortBindings': {},
 'VolumesFrom': []}
compose.cli.verbose_proxy.proxy_callable: docker create_host_config -> {'Binds': [],
 'Links': [],
 'LogConfig': {'Config': {}, 'Type': u''},
 'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default',
 'PortBindings': {},
 'VolumesFrom': []}
compose.service.create_container: Creating buildkitec5b98706b9db4c8eabee424c117d2f91_db_1
compose.service.create_container: Creating buildkitec5b98706b9db4c8eabee424c117d2f91_redis_1
compose.cli.verbose_proxy.proxy_callable: docker create_container <- (name=u'buildkitec5b98706b9db4c8eabee424c117d2f91_db_1', image='postgres', labels={u'com.docker.compose.service': u'db', u'com.docker.compose.project': u'buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.config-hash': 'ebf3fee0ea4d13e14b56da2d5938dd1edb25e8e25bbcdf5c89185104ba88b78c', u'com.docker.compose.version': u'1.7.1', u'com.docker.compose.oneoff': u'False', u'com.docker.compose.container-number': '1'}, host_config={'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', 'Links': [], 'PortBindings': {}, 'Binds': [], 'LogConfig': {'Type': u'', 'Config': {}}, 'VolumesFrom': []}, environment=[], volumes={}, detach=True, networking_config={u'EndpointsConfig': {u'buildkitec5b98706b9db4c8eabee424c117d2f91_default': {u'IPAMConfig': {}, u'Aliases': ['db']}}})
compose.cli.verbose_proxy.proxy_callable: docker create_container <- (name=u'buildkitec5b98706b9db4c8eabee424c117d2f91_redis_1', image='redis', labels={u'com.docker.compose.service': u'redis', u'com.docker.compose.project': u'buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.config-hash': '633502eb025c2e369569317e26f222328952f89316c4b0e2120f1b2a7ffbf9e9', u'com.docker.compose.version': u'1.7.1', u'com.docker.compose.oneoff': u'False', u'com.docker.compose.container-number': '1'}, host_config={'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', 'Links': [], 'PortBindings': {}, 'Binds': [], 'LogConfig': {'Type': u'', 'Config': {}}, 'VolumesFrom': []}, environment=[], volumes={}, detach=True, networking_config={u'EndpointsConfig': {u'buildkitec5b98706b9db4c8eabee424c117d2f91_default': {u'IPAMConfig': {}, u'Aliases': ['redis']}}})
compose.parallel.feed_queue: Pending: set([])
compose.cli.verbose_proxy.proxy_callable: docker create_container -> {u'Id': u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f',
 u'Warnings': None}
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'',
 u'Args': [u'postgres'],
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'postgres'],
             u'Domainname': u'',
             u'Entrypoint': [u'/docker-entrypoint.sh'],
             u'Env': [u'no_proxy=*.local, 169.254/16',
                      u'PATH=/usr/lib/postgresql/9.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker attach <- (u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f', stderr=True, stream=True, stdout=True)
compose.cli.verbose_proxy.proxy_callable: docker attach -> <generator object _multiplexed_response_stream_helper at 0x1044045f0>
compose.cli.verbose_proxy.proxy_callable: docker disconnect_container_from_network <- (u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f', u'buildkitec5b98706b9db4c8eabee424c117d2f91_default')
compose.cli.verbose_proxy.proxy_callable: docker disconnect_container_from_network -> None
compose.cli.verbose_proxy.proxy_callable: docker connect_container_to_network <- (u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f', u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', ipv4_address=None, ipv6_address=None, links=[], aliases=[u'a613bf5f1ad9', 'db'])
compose.cli.verbose_proxy.proxy_callable: docker connect_container_to_network -> None
compose.cli.verbose_proxy.proxy_callable: docker start <- (u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f')
compose.parallel.feed_queue: Pending: set([])
compose.cli.verbose_proxy.proxy_callable: docker create_container -> {u'Id': u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520',
 u'Warnings': None}
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'',
 u'Args': [u'redis-server'],
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'redis-server'],
             u'Domainname': u'',
             u'Entrypoint': [u'docker-entrypoint.sh'],
             u'Env': [u'no_proxy=*.local, 169.254/16',
                      u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker attach <- (u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520', stderr=True, stream=True, stdout=True)
compose.cli.verbose_proxy.proxy_callable: docker attach -> <generator object _multiplexed_response_stream_helper at 0x1044fba50>
compose.cli.verbose_proxy.proxy_callable: docker disconnect_container_from_network <- (u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520', u'buildkitec5b98706b9db4c8eabee424c117d2f91_default')
compose.cli.verbose_proxy.proxy_callable: docker disconnect_container_from_network -> None
compose.cli.verbose_proxy.proxy_callable: docker connect_container_to_network <- (u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520', u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', ipv4_address=None, ipv6_address=None, links=[], aliases=['redis', u'0083ab682392'])
compose.cli.verbose_proxy.proxy_callable: docker connect_container_to_network -> None
compose.cli.verbose_proxy.proxy_callable: docker start <- (u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520')
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.cli.verbose_proxy.proxy_callable: docker start -> None
compose.cli.verbose_proxy.proxy_callable: docker start -> None
compose.parallel.parallel_execute_iter: Finished processing: <Service: db>
compose.parallel.feed_queue: Pending: set([])
compose.parallel.parallel_execute_iter: Finished processing: <Service: redis>
compose.parallel.feed_queue: Pending: set([])
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- (u'buildkitec5b98706b9db4c8eabee424c117d2f91_default')
compose.cli.verbose_proxy.proxy_callable: docker inspect_network -> {u'Containers': {u'0083ab6823920126237e35284ca59126f6330ef6af0df0621bde9c650722d520': {u'EndpointID': u'6847b7b51a74da7eaedef10ef2ba21315dbdd92b747e861abf74a406b210eedc',
                                                                                       u'IPv4Address': u'172.18.0.3/16',
                                                                                       u'IPv6Address': u'',
                                                                                       u'MacAddress': u'02:42:ac:12:00:03',
                                                                                       u'Name': u'buildkitec5b98706b9db4c8eabee424c117d2f91_redis_1'},
                 u'a613bf5f1ad9926defe08cd3c5c1974850161782c753f21df716069aa5bb8a4f': {u'EndpointID': u'798087ba37afd9e5578ca5633ee2f790db06d5be58117a2427de454fdaf129d8',
                                                                                       u'IPv4Address': u'172.18.0.2/16',
                                                                                       u'IPv6Address': u'',
                                                                                       u'MacAddress': u'02:42:ac:12:00:02',
                                                                                       u'Name': u'buildkitec5b98706b9db4c8eabee424c117d2f91_db_1'}},
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- (u'buildkitec5b98706b9db4c8eabee424c117d2f91_app')
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'',
 u'Comment': u'',
 u'Config': {u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'/bin/bash'],
             u'Domainname': u'',
             u'Entrypoint': None,
             u'Env': [u'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'],
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=app', u'com.docker.compose.oneoff=True']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={u'label': [u'com.docker.compose.project=buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.service=app', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker create_host_config <- (memswap_limit=None, links=[], devices=None, pid_mode=None, log_config={'Type': u'', 'Config': {}}, cpu_quota=None, read_only=None, dns=None, volumes_from=[], port_bindings={}, security_opt=None, extra_hosts=None, cgroup_parent=None, network_mode=u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', shm_size=None, tmpfs=None, cap_add=None, restart_policy=None, dns_search=None, privileged=False, binds=[u'/Users/sj26/Library/Buildkite/hooks/test-2/test/test:/app:rw'], ipc_mode=None, mem_limit=None, cap_drop=None, ulimits=None)
compose.cli.verbose_proxy.proxy_callable: docker create_host_config -> {'Binds': [u'/Users/sj26/Library/Buildkite/hooks/test-2/test/test:/app:rw'],
 'Links': [],
 'LogConfig': {'Config': {}, 'Type': u''},
 'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default',
 'PortBindings': {},
 'VolumesFrom': []}
compose.cli.verbose_proxy.proxy_callable: docker create_container <- (tty=True, stdin_open=True, name=u'buildkitec5b98706b9db4c8eabee424c117d2f91_app_run_1', image=u'buildkitec5b98706b9db4c8eabee424c117d2f91_app', labels={u'com.docker.compose.version': u'1.7.1', u'com.docker.compose.container-number': '1', u'com.docker.compose.service': u'app', u'com.docker.compose.project': u'buildkitec5b98706b9db4c8eabee424c117d2f91', u'com.docker.compose.oneoff': u'True'}, host_config={'NetworkMode': u'buildkitec5b98706b9db4c8eabee424c117d2f91_default', 'Links': [], 'PortBindings': {}, 'Binds': [u'/Users/sj26/Library/Buildkite/hooks/test-2/test/test:/app:rw'], 'LogConfig': {'Type': u'', 'Config': {}}, 'VolumesFrom': []}, environment=[u'PGUSER=postgres', u'PGHOST=db', u'REDIS_URL=redis://redis'], command=['./command'], volumes={u'/app': {}}, detach=False, ports=[], networking_config={u'EndpointsConfig': {u'buildkitec5b98706b9db4c8eabee424c117d2f91_default': {u'IPAMConfig': {}, u'Aliases': ['app']}}})
compose.cli.verbose_proxy.proxy_callable: docker create_container -> {u'Id': u'7b7340711a9449409ba7d420c0fb24151ab2ad66c2cb1170dcd7ff491ddc541c',
 u'Warnings': None}
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'7b7340711a9449409ba7d420c0fb24151ab2ad66c2cb1170dcd7ff491ddc541c')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'',
 u'Args': [],
 u'Config': {u'AttachStderr': True,
             u'AttachStdin': True,
             u'AttachStdout': True,
             u'Cmd': [u'./command'],
             u'Domainname': u'',
             u'Entrypoint': None,
             u'Env': [u'PGUSER=postgres',
                      u'PGHOST=db',
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'7b7340711a9449409ba7d420c0fb24151ab2ad66c2cb1170dcd7ff491ddc541c')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'',
 u'Args': [],
 u'Config': {u'AttachStderr': True,
             u'AttachStdin': True,
             u'AttachStdout': True,
             u'Cmd': [u'./command'],
             u'Domainname': u'',
             u'Entrypoint': None,
             u'Env': [u'PGUSER=postgres',
                      u'PGHOST=db',
...
compose.cli.verbose_proxy.proxy_callable: docker attach_socket <- (u'7b7340711a9449409ba7d420c0fb24151ab2ad66c2cb1170dcd7ff491ddc541c', {'stdin': 1, 'logs': False, 'stream': 1})
compose.cli.verbose_proxy.proxy_callable: docker attach_socket -> <socket object, fd=11, family=1, type=1, protocol=0>
compose.cli.verbose_proxy.proxy_callable: docker attach_socket <- (u'7b7340711a9449409ba7d420c0fb24151ab2ad66c2cb1170dcd7ff491ddc541c', {'logs': False, 'stream': 1, 'stdout': 1})
ERROR: compose.cli.errors.log_api_error: Bad response from Docker engine

Sometimes removing all containers and images then restarting Docker.app will fix the issue temporarily, but it comes back intermittently.

Installed the beta15 update this morning and this problem is no longer occurring.

  • Version 1.11.2-beta15 (build: 9168) 603884f1679ff0528724854e9d27fc8e67fdfd8f

I am seeing something similar with 1.12.0-rc3. At first I noticed that docker-compose commands were always timing out, but now every command I try gives me the ā€˜Bad response from Docker engineā€™ error.

Iā€™ve tried restarting Docker, restarting my machine, etc. but Iā€™m now getting this error all the time. I just tried running some docker commands and also get ā€œError response from daemon: Bad response from Docker engineā€.

edit: well, re-installing Docker from the Preferences option has fixed this issue so far, Iā€™ll see if it appears again.