title: docker-entrypoint-initdb.d bad interpreter: Permission denied
body: <p>Hi I a using <code>postgres</code> <code>docker-compose</code> in my application. When I am trying to run it on my local machine (macOS Big Sur) I am getting below error and <code>postgres</code> container exited.</p>
  <pre><code> /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/postgres-ssl.sh
  /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/postgres-ssl.sh: /bin/bash: bad interpreter: Permission denied
  </code></pre>
  <p>Below is my <code>docker-compose</code></p>
  <pre><code>postgres:
  build:
    context: ./setup/postgres
    dockerfile: ./Dockerfile
  command:
    -c ssl=on -c ssl_cert_file=/var/lib/postgresql/ssl/certs/server.crt
    -c ssl_key_file=/var/lib/postgresql/ssl/certs/server.key
    -c ssl_ca_file=/var/lib/postgresql/ssl/certs/root.crt
  ports:
    - '5432:5432'
  volumes:
    - ./setup/postgres/scripts:/docker-entrypoint-initdb.d
  environment:
    - POSTGRES_HOST_AUTH_METHOD=trust
  </code></pre>
  <p>Am I missing any steps here?</p>