Can I provide hostname as a parameter for Postgres Docker image ?
Issue
- Following the process described in document it would be very convenient to use -h option for postgres.
- At the moment we run multiple postgres instances on every host like this :
[root@xxxxxx ~]# ps -ef | grep postgresql92
postgres 18333 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/bom/pgcluster/data -h xxxxx -p 5432 -k /app/bom/tmp
root 34880 34844 0 15:21 pts/1 00:00:00 grep postgresql92
postgres 36168 1 0 Jun26 ? 00:00:37 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/qmsone/pgcluster/data -h xxxxx -p 5432 -k /app/qmsone/tmp
postgres 38828 1 0 Jun14 ? 00:00:20 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/csa/pgcluster/data -h xxxxx -p 5432 -k /app/csa/tmp
postgres 39118 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/digg/pgcluster/data -h xxxxx -p 5432 -k /app/digg/tmp
postgres 39468 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/imx/pgcluster/data -h xxxxx-p 5432 -k /app/imx/tmp
postgres 41225 1 0 Jun14 ? 00:00:22 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/link/pgcluster/data -h xxxx. -p 5432 -k /app/link/tmp
postgres 42147 1 0 Jun14 ? 00:00:20 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/lti/pgcluster/data -h xxxxx. -p 5432 -k /app/lti/tmp
postgres 42173 1 0 Jun14 ? 00:00:22 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/sps/pgcluster/data -h xxxxx -p 5432 -k /app/sps/tmp
postgres 42274 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/malerts/pgcluster/data -h xxxxx -p 5432 -k /app/malerts/tmp
postgres 42476 1 0 Jun14 ? 00:07:02 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/chart/pgcluster/data -h xxxxx -p 5432 -k /app/chart/tmp
postgres 42662 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/mtrd/pgcluster/data -h xxxxx -p 5432 -k /app/mtrd/tmp
postgres 43034 1 0 Jun14 ? 00:00:59 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/opus/pgcluster/data -h xxxxx -p 5432 -k /app/opus/tmp
postgres 43055 1 0 Jun14 ? 00:00:20 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/oats/pgcluster/data -h xxxxx -p 5432 -k /app/oats/tmp
postgres 45435 1 0 Jun14 ? 00:01:39 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/mfadmn/pgcluster/data -h xxxxx -p 5432 -k /app/mfadmn/tmp
postgres 46472 1 0 Jun14 ? 00:03:29 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/portbld/pgcluster/data -h xxxxx -p 5432 -k /app/portbld/tmp
postgres 50147 1 0 Jun14 ? 00:00:20 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/small/pgcluster/data -h xxxxx -p 5432 -k /app/small/tmp
postgres 50435 1 0 Jun14 ? 00:00:41 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/smr/pgcluster/data -h xxxxxx -p 5432 -k /app/smr/tmp
postgres 51049 1 0 Jun14 ? 00:00:21 /opt/rh/postgresql92/root/usr/bin/postgres -D /app/finpln/pgcluster/data -h xxxxxx -p 5432 -k /app/finpln/tmp
Environment
- Red Hat Enterprise Linux 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.