postgis / docker-postgis

Docker image for PostGIS
https://hub.docker.com/r/postgis/postgis/
MIT License
1.37k stars 462 forks source link

Connection command in README #234

Closed amercader closed 3 years ago

amercader commented 3 years ago

Thanks for this image, it's really helpful to get PostGIS running!

Is there are a reason that the README suggests using another separate postgres container to connect to the postgis one rather than connecting directly using docker exec?

ie, using this:

docker exec -ti some-postgis psql -U postgres

instead of this:

docker run -it --link some-postgis:postgres --rm postgres \
    sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
phillipross commented 3 years ago

I can't think of any "good" reason for doing it this way. I imagine the documentation was simply written so long ago, hasn't been updated, and might have been written this way in older versions of the postgres official image.

phillipross commented 3 years ago

@amercader i'm going to close out this issue now, but please feel free to submit a PR documenting a more modern way to make connections. Thanks!

amercader commented 3 years ago

Thanks @phillipross I just did that