Closed christianblueskylabs closed 2 years ago
Hi @christianblueskylabs ,
Thanks for opening this issue!
role "root" does not exist
... Being able to access psql from the container is very important
your issue is probably related to:
or you can find similar issues in the upstream docker Postgres repo:
IMHO: You have to add the database connection parameters;
For example: based on your docker-compose example:
docker exec -it c68e3e8e27bd bash
psql -d test_db -U notroot
<----- it is working for me.if this is not working for you, probably you have already initialized the PostgreSQL database with the previous parameters (different user, ...)
pgtest-pgsql
volume - before re-testing your settings with any change!and please check the PostgreSQL logs !
I have tested this with both 14-master and 13-master.
if you are first time user .. my recommendation is 14-3.2
or 13-3.2
14-master
is the PostGIS development version ( so not released ! only for testing strange errors )14-3.2
uses Debian based PostgreSQL 14 + latest released PostGIS 3.2 <-- this is the recommended ! important: This repo is only the extension of the official Postgres docker image;
You can find the docker PostgreSQL documentation here ( https://github.com/docker-library/docs/blob/master/postgres/README.md )
and everything should work with the postgis/postgis:14-3.2
image
HI @ImreSamu ,
Thanks for chiming in. Prior to your comment, I have tried everything of those you have already outlined, some not really 100% relevant except for pinning the version. I have to say for some reason that worked when I paid very close attention to the user/group ownership of the socket. I must have indeed just missed a few things. Thanks, closing issue now.
When using the image with Docker Compose and accessing it with
docker exec -it <container name> bash
andpsql
, you will get this error message:I have tried to isolate the problem with the following:
docker run
to test and see if I can runpsql
just finedocker-compose.yml
of mine and psql sports the error.For #1, I ran the following command:
Running
psql
just works fine.I won't go into detail with #2 as #3 might be more interesting. For #3, I had the following docker-compose.yml:
4 works completely fine, but I won't go into detail into it as there are heaps of files involved. If any of you would like to have it, feel free to ask.
I have tested this with both
14-master
and13-master
.Being able to access psql from the container is very important as you will need this capability to export and import [very large] databases.