Skip to content

Conversation

@amercader
Copy link
Contributor

@amercader amercader commented Jun 17, 2021

Refs #234
Use docker exec on the running container rather than booting up another postgres container to connect to the database

Use `docker exec` on the running container rather than booting up another postgres container to connect to the database
@phillipross
Copy link
Contributor

Looks go to me. Thanks for the contribution!

@ImreSamu
Copy link
Member

IMHO:
there are multiple alternative use cases and I will keep the old general method.
( so show both versions)
in the https://hub.docker.com/_/postgres/ - there is a similar "How to use this image" part

@phillipross
Copy link
Contributor

IMHO:
there are multiple alternative use cases and I will keep the old general method.
( so show both versions)
in the https://hub.docker.com/_/postgres/ - there is a similar "How to use this image" part

Actually, I agree with @ImreSamu and thought that I remembered references in the official postgres documentation, but I wasn't able to find them when the issue (#234) was initially submitted.

I think both should be shown: both using the networking connection from outside the container as well as directly invoking psql inside the container. After looking closer, I see that the official postgres image doesn't use container links (the old way) but uses a network connection (the more modern way) to connect the client container to the server container. Without a doubt, connecting via a network remains a significant use case even today, and is very relevant with respect to how the server container is configured regarding authentication and external network connections.

@amercader do you understand what we are referring to here? If so, can you update the PR with changes to show both, referring to the official postgres images where it is demonstrated how the network connection is made?

@amercader
Copy link
Contributor Author

@phillipross I understand and I'll update the PR

@amercader
Copy link
Contributor Author

@phillipross @ImreSamu let me know if the updated docs make sense

@phillipross phillipross merged commit 37522d4 into postgis:master Jun 17, 2021
@phillipross
Copy link
Contributor

@amercader The updated docs did make sense. I've merged the PR, and the new docs on are now live on docker hub. Thanks for your contribution!

@ImreSamu
Copy link
Member

@amercader: Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants