title: postgres docker exits with code 1 and exec user process caused "no such file or directory"
body: <p>I am trying to spin up a docker img of a postgres db alongside my app.</p>
  
  <p>I am wondering if this is some linux compatibility thing since I am running docker on windows 10?</p>
  
  <p>When I run the command:  docker-compose -f docker-compose-dev.yml up --build
  I get all the way to the bottom and fail :</p>
  
  <pre><code>Starting testdriven-app_users-db_1 ... done
  Recreating testdriven-app_users_1  ... done
  Attaching to testdriven-app_users-db_1, testdriven-app_users_1 users-db_1  | 2018-11-06 01:39:05.178 UTC [1] LOG:  listening on IPv4 address"0.0.0.0", port 5432
  users-db_1  | 2018-11-06 01:39:05.178 UTC [1] LOG:  listening on IPv6 address "::", port 5432
  users-db_1  | 2018-11-06 01:39:05.198 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
  users-db_1  | 2018-11-06 01:39:05.212 UTC [20] LOG:  database system was shut down at 2018-11-06 01:37:48 UTC
  users-db_1  | 2018-11-06 01:39:05.216 UTC [1] LOG:  database system is ready to accept connections
  users_1     | standard_init_linux.go:190: exec user process caused "no such file or directory"
  testdriven-app_users_1 exited with code 1
  </code></pre>
  
  <p>here is my yml file:</p>
  
  <pre><code>version: "3.6"
  
  services:
    users:
      build:
        context: ./services/users
        dockerfile: Dockerfile-dev
      volumes:
        - "./services/users:/usr/src/app"
      ports:
        - 5001:5000
      environment:
        - FLASK_APP=project/__init__.py
        - FLASK_ENV=development
        - APP_SETTINGS=project.config.DevelopmentConfig
        - DATABASE_URL=postgres://postgres:postgres@users-db:5432/users_dev
        - DATABASE_TEST=postgres://postgres:postgres@users-db:5432/users_test
  
      depends_on:
        - users-db
  
    users-db:
     build:
      context: ./services/users/project/db
      dockerfile: Dockerfile
     ports:
      - 5432:5432
     environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
  </code></pre>
  
  <p>and my docker file:</p>
  
  <pre><code>FROM python:3.6.5-alpine
  
  RUN apk update &amp;&amp; \
      apk add --virtual build-deps gcc python-dev musl-dev &amp;&amp; \
      apk add postgresql-dev &amp;&amp; \
      apk add netcat-openbsd
  
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  
  COPY ./requirements.txt /usr/src/app/requirements.txt
  RUN pip install -r requirements.txt
  
  COPY ./entrypoint.sh /usr/src/app/entrypoint.sh
  RUN chmod +x /usr/src/app/entrypoint.sh
  
  COPY . /usr/src/app
  
  CMD ["/usr/src/app/entrypoint.sh"]
  </code></pre>
  
  <p>and the subsequent entrypoint.sh:</p>
  
  <pre><code>#!/bin/sh
  
  echo "Waiting for postgres..."
  
  while ! nc -z users-db 5432; do
      sleep 0.1
  done
  
  echo "PostgresSQL started"
  
  python manage.py run --host 0.0.0.0
  </code></pre>