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

From Jeremy Smith
Subject Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Date
Msg-id CAM8SmLWFLrtthWhqzEnDJ_tnVS14gp=kgacyW2+aZqoYDsjFNg@mail.gmail.com
Whole thread Raw
In response to Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general

Is anybody able spotting, what am I doing wrong here? Thank you


Unless I'm mistaken, it seems like you are trying to run jetty and postgres in the same container.  You should really use two containers and run them both with docker compose.  Docker is very much designed to run a single service.  This should also greatly simplify your Dockerfile - you could probably just use the vanilla postgres image for the postgres container.  Here's some info on how to achieve this:



pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Next
From: Scott Taylor
Date:
Subject: Unable to Recover a Deleted Database Using PITR