[GRASS-user] grass gis, docker, postgresql

Vincent Bain bain at toraval.fr
Wed May 18 07:53:20 PDT 2022


Dear GRASS users,

Sorry in advance if my question is clearly not straightly related to
grass, but any suggestions are welcome from those who are used to run
grass in docker containers.
Once in a while I need to run a rather old version of GRASS, especially
for a compatibility issue with old scripts that need to run X0
monitors. The easiest way I found to compile such an ancient flavour of
GRASS was to run it within a docker container. It works fine, including
the ability to run graphical interface. I stumble upon a problem when I
try to configure a connection with an host based postgresql database.
The only way I can interact with my remote db is to add a very
permissive rule to my pg_hba.conf file, i.e.:

   host all all 192.168.1.2/32 trust

If I change the method from trust to anything else (md5, password,
ident) I cannot connect and db comands return errors like:

   echo 'select * from mytable'|db.select 
   DBMI-Postgres driver error:
   Cannot connect to Postgres: FATAL:  authentification par mot de
   passe échouée pour l'utilisateur  « vincent »
   FATAL:  authentification par mot de passe échouée pour
   l'utilisateur 
   « vincent »
   ERROR: Unable to open database <host=172.17.0.1,dbname=test>


My docker container is run with --network=host option.

Thanks for your advice!
Vincent.




More information about the grass-user mailing list