Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Date: 2024-12-02 11:24:21
Message-ID: CAADeyWjtM=vHYCPDGOZ4Cjy2n7dWjoAUJhNrUMXHqra29h0vFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi again, I would like to share a slightly better workaround
(does not restart PostgreSQL) for enabling localhost connections
(for example for servlets) in a postgres:17-alpine3.20 based Dockerfile:

RUN sed -i "s/listen_addresses=''/listen_addresses='localhost'/"
/usr/local/bin/docker-entrypoint.sh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Krah 2024-12-02 11:31:56 Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Previous Message Arbol One 2024-12-02 00:21:44 Re: Help with syntax error