kriasoft/graphql-starter-kit

docker-compose up fails when run on a docker version 1.7 up of installed through docker toolbox on win 7

mrtinkz opened this issue · 10 comments

~ docker-compose up
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 68, in main
  File "compose\cli\main.py", line 118, in perform_command
  File "compose\cli\main.py", line 928, in up
  File "compose\project.py", line 414, in up
  File "compose\project.py", line 640, in warn_for_swarm_mode
  File "site-packages\docker\api\daemon.py", line 90, in info
  File "site-packages\docker\utils\decorators.py", line 46, in inner
  File "site-packages\docker\api\client.py", line 189, in _get
  File "site-packages\requests\sessions.py", line 488, in get
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1042, in request
  File "httplib.py", line 1082, in _send_request
  File "httplib.py", line 1038, in endheaders
  File "httplib.py", line 882, in _send_output
  File "httplib.py", line 844, in send
  File "site-packages\docker\transport\npipeconn.py", line 31, in connect
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 50, in connect
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specified.')
Failed to execute script docker-compose

What's your Docker version, 17.06.2-ce?

https://docs.docker.com/docker-for-windows/

Docker version 17.07.0-ce, build 8784753
docker-compose version 1.15.0, build e12f3b94
docker-machine version 0.12.2, build 9371605

Does at least docker-compose build --no-cache work fine? Does you docker-compose work with other projects / docker-compose.yml files?

docker-compose build --no-cache - does not work either. nodejs-api-starter is the only project I am using the docker-compse up

Trying to run on a linux os Fedora Docker version 17.09.0-ce, build afdb6d4

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

@mrtinkz perhaps your docker-compose tool is outdated.

@koistya I thought about it and updated the docker-compose to the latest, but it's the same result.

-- SOLUTION --
(Warning: this will remove all your docker settings and data, so use caution, and at own risk)

  1. make sure you are using the latest Docker and docker-compose (ya, I know this is obvious)
  2. Reset Docker and Remove all data -> Docker -> Preferences -> Reset -> "Remove all data" and "Reset to factory defaults"
  3. Re-run docker-compose up - And Voila!

Basically in the initial build of Postgres, if you built the image with another app, it doesn't run the init.db thus does not install the module for uuid-ossp. With the clean reset, it forces Docker to rebuild the Postgres image with the init.db file. (Well at least this is my theory, and why this process worked for me.)

@mrtinkz: see my solution above. Did you get it working?

You can now launch the API app without a Docker.