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

From: Jeremy Smith <jeremy(at)musicsmith(dot)net>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
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 13:25:13
Message-ID: CAM8SmLWFLrtthWhqzEnDJ_tnVS14gp=kgacyW2+aZqoYDsjFNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:

https://www.docker.com/blog/how-to-use-the-postgres-docker-official-image/#Using-Docker-Compose

In response to

Browse pgsql-general by date

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