{"action":"created","issue":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/3709","repository_url":"https://api.github.com/repos/GeoNode/geonode","labels_url":"https://api.github.com/repos/GeoNode/geonode/issues/3709/labels{/name}","comments_url":"https://api.github.com/repos/GeoNode/geonode/issues/3709/comments","events_url":"https://api.github.com/repos/GeoNode/geonode/issues/3709/events","html_url":"https://github.com/GeoNode/geonode/issues/3709","id":311059297,"number":3709,"title":"[Docker] docker-compose doesn't work on Docker for Windows","user":{"login":"olivierdalang","id":1894106,"avatar_url":"https://avatars2.githubusercontent.com/u/1894106?v=4","gravatar_id":"","url":"https://api.github.com/users/olivierdalang","html_url":"https://github.com/olivierdalang","followers_url":"https://api.github.com/users/olivierdalang/followers","following_url":"https://api.github.com/users/olivierdalang/following{/other_user}","gists_url":"https://api.github.com/users/olivierdalang/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierdalang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierdalang/subscriptions","organizations_url":"https://api.github.com/users/olivierdalang/orgs","repos_url":"https://api.github.com/users/olivierdalang/repos","events_url":"https://api.github.com/users/olivierdalang/events{/privacy}","received_events_url":"https://api.github.com/users/olivierdalang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-04T02:03:38Z","updated_at":"2018-04-10T22:15:47Z","closed_at":null,"author_association":"NONE","body":"Hi !\r\n\r\nOn Windows, `docker-compose up --build -d` doesn't work because of following errors:\r\n\r\n```\r\nERROR: for 5c026c2ef83c_django4geonode  Cannot create container for service django: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'\r\nERROR: for geoserver  Cannot create container for service geoserver: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'\r\nERROR: for consumers  Cannot create container for service consumers: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'\r\nERROR: for celery  Cannot create container for service celery: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'\r\nERROR: for django  Cannot create container for service django: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'\r\nERROR: Encountered errors while bringing up the project.\r\n```\r\n\r\nIt's not really clear why you need to mount the docker socket though, which should only be needed by containers needing to access the docker daemon. It would be nice if we could avoid it, as it doesn't seem to be supported on Windows.\r\n\r\nI tried commenting out all occurrences of `- /var/run/docker.sock:/var/run/docker.sock` in the docker-compose, the all container start, but they crash because. So it seems the docker socket is needed somewhere.\r\n\r\nContent of `docker logs django4geonode` (which /var/run/docker.sock comment out) :\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/invoke\", line 11, in <module>\r\n    sys.exit(program.run())\r\n  File \"/usr/local/lib/python2.7/site-packages/invoke/program.py\", line 293, in run\r\n    self.execute()\r\n  File \"/usr/local/lib/python2.7/site-packages/invoke/program.py\", line 414, in execute\r\n    executor.execute(*self.tasks)\r\n  File \"/usr/local/lib/python2.7/site-packages/invoke/executor.py\", line 129, in execute\r\n    result = call.task(*args, **call.kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/invoke/tasks.py\", line 115, in __call__\r\n    result = self.body(*args, **kwargs)\r\n  File \"/usr/src/app/tasks.py\", line 23, in update\r\n    pub_ip = _geonode_public_host_ip()\r\n  File \"/usr/src/app/tasks.py\", line 142, in _geonode_public_host_ip\r\n    gn_pub_hostip = _docker_host_ip()\r\n  File \"/usr/src/app/tasks.py\", line 81, in _docker_host_ip\r\n    network_mode='host'\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/models/containers.py\", line 756, in run\r\n    detach=detach, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/models/containers.py\", line 814, in create\r\n    resp = self.client.api.create_container(**create_kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/api/container.py\", line 404, in create_container\r\n    return self.create_container_from_config(config, name)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/api/container.py\", line 414, in create_container_from_config\r\n    res = self._post_json(u, data=config, params=params)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/api/client.py\", line 253, in _post_json\r\n    return self._post(url, data=json.dumps(data2), **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/utils/decorators.py\", line 46, in inner\r\n    return f(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/docker/api/client.py\", line 190, in _post\r\n    return self.post(url, **self._set_request_timeout(kwargs))\r\n  File \"/usr/local/lib/python2.7/site-packages/requests/sessions.py\", line 555, in post\r\n    return self.request('POST', url, data=data, json=json, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/requests/sessions.py\", line 508, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/requests/sessions.py\", line 618, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/usr/local/lib/python2.7/site-packages/requests/adapters.py\", line 490, in send\r\n    raise ConnectionError(err, request=request)\r\nrequests.exceptions.ConnectionError: ('Connection aborted.', error(2, 'No such file or directory'))\r\n```\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/comments/380264975","html_url":"https://github.com/GeoNode/geonode/issues/3709#issuecomment-380264975","issue_url":"https://api.github.com/repos/GeoNode/geonode/issues/3709","id":380264975,"user":{"login":"cezio","id":116021,"avatar_url":"https://avatars2.githubusercontent.com/u/116021?v=4","gravatar_id":"","url":"https://api.github.com/users/cezio","html_url":"https://github.com/cezio","followers_url":"https://api.github.com/users/cezio/followers","following_url":"https://api.github.com/users/cezio/following{/other_user}","gists_url":"https://api.github.com/users/cezio/gists{/gist_id}","starred_url":"https://api.github.com/users/cezio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezio/subscriptions","organizations_url":"https://api.github.com/users/cezio/orgs","repos_url":"https://api.github.com/users/cezio/repos","events_url":"https://api.github.com/users/cezio/events{/privacy}","received_events_url":"https://api.github.com/users/cezio/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T22:15:46Z","updated_at":"2018-04-10T22:15:46Z","author_association":"CONTRIBUTOR","body":"We can provide sibling or auxiliary docker-compose dedicated for Windows platform (https://docs.docker.com/compose/extends/#understanding-multiple-compose-files)"}}
{"actor":{"display_login":"cezio"}}