Skip to content

Mounting volume on /docker-entrypoint.d prevents postgis initialization #35

Closed
@johnktims

Description

@johnktims

I'm using docker-compose and I'd like to run some .sql files when the container starts up, but that conflicts with COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh in the Dockerfile.

  postgresql:
    image: mdillon/postgis:latest
    ports:
      - "5432:5432"
    volumes:
      - ./postgresql:/docker-entrypoint-initdb.d
    environment:
      - POSTGRES_USER=test
      - POSTGRES_PASSWORD=test
      - POSTGRES_DB=test

From what I've read, this is the expected behavior for docker volumes so I don't think this is a bug in your project, but I'm wondering if you're aware of a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions