Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tI4Xg-00BvEd-PB for pgsql-general@arkaria.postgresql.org; Mon, 02 Dec 2024 11:24:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tI4Xd-00GPDU-7j for pgsql-general@arkaria.postgresql.org; Mon, 02 Dec 2024 11:24:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tI4Xc-00GPDL-SK for pgsql-general@lists.postgresql.org; Mon, 02 Dec 2024 11:24:38 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tI4Xb-000dgS-EK for pgsql-general@postgresql.org; Mon, 02 Dec 2024 11:24:36 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aa5b0d8bd41so479792566b.2 for ; Mon, 02 Dec 2024 03:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733138673; x=1733743473; darn=postgresql.org; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=2yJZ4Kn5Pz81/alrIJTsukLbaLmdvMSh5Ln+Xt0kHRU=; b=lJgZWiP1iA8Z7tlIdhK54Dr7Xui1FsIXIdSEOvZiA3FDRQ8HSLwNICal455YWWJyOM hGuZyas41f53q5rdf0PfP3lQJ3Z/uimkUvOPWNrb3Bq0FH04X+Ae3T4Ng84j7CssnJeM uPrOkHurhaRLRmNogGBAmHkfewPMjZp9yYHtV9l5D+neqJaA3vMkRZvCEBOnfubyGofx WpajgEnzKVu8/DnAC8Xl8s8etEDgJCBlgTvxLDMAvKWKwko2DFsc6IMOcvz8oqFrUcab UXFrijJgvmeFRjlFySEKhIuU+BS9epVRq0ynXlqx6/MGsLn4WoAydI5W7M6z2s7l/NQ2 T1pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733138673; x=1733743473; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2yJZ4Kn5Pz81/alrIJTsukLbaLmdvMSh5Ln+Xt0kHRU=; b=GtDz8TzP3jWZ2Qfi8CoFPjs38a1N5xzahsqFzLluGH9zDT/znknfKioEG8UtlEI9iZ q4dxpJH4HMfdRiayN/gKLMxVwtyvXo+r2iBt4HEX476yYFURVnufH0M2G8ybKje1cjup Y09uO4gM1JIVEYkz6F2mkZfHQ/md5hj+cNyi7ldmYS4Y7ofeSHqQtlybnW+VtHb4+197 6oyLXw+JbbabHvtaP3tHqKfs8QlslAKSJ8Xw88ReivoQYLyHXG1gaHjZ9FY6pHejDJgF ljH923ncQ6kJ4hYTTxt/lrnu4S4DaYS1p606WNI8i2e+m2MUxHprjark8iC32ApUgFf8 HzQg== X-Gm-Message-State: AOJu0YzClbs/Ju8hh4Qfk9i8pUI1hoh/4vbHM9BVDCnoL25H4lDlw5w0 BJubn6RQdZ47oNxr9wEYw4IDiOMqu+J50L6SQSczdT6bqXzMSqWYNi9eLqLSreXE8cZr6Ad10pb 40LAATdcAGfm7W5fd/szAt2oWtYqg29OI X-Gm-Gg: ASbGnctcGSGOX6dRquklcIe6R4C3fOIrH3T2OqV8BPb+/BaNq4/mgiM0IDvlloCvq5n J8p01/S6PBm/42SjXz8NPMwOMVcVxO24Omw== X-Google-Smtp-Source: AGHT+IE4iRLHZQIUssnwO8nsI2JBMXn0ZmyOGvSuptsV6PHGTCFM0UXOpAUuqna7NF3lvqJQwrqEQiuzuluZC/Yi85o= X-Received: by 2002:a17:906:3295:b0:aa5:1757:bdd6 with SMTP id a640c23a62f3a-aa580ee8744mr1881420466b.7.1733138672909; Mon, 02 Dec 2024 03:24:32 -0800 (PST) MIME-Version: 1.0 References: <1454490.1733083127@sss.pgh.pa.us> In-Reply-To: From: Alexander Farber Date: Mon, 2 Dec 2024 12:24:21 +0100 Message-ID: Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20 Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000f2041b062847cab6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f2041b062847cab6 Content-Type: text/plain; charset="UTF-8" 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 --000000000000f2041b062847cab6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi again, I would like t= o share a slightly better workaround
(does not restart PostgreSQL) for e= nabling localhost connections
(for example for servle= ts) in a=C2=A0postgres:17-alpine3.20 based Dockerfile:

RUN=C2=A0sed -i "s/listen_addresses=3D''/listen_addresse= s=3D'localhost'/" /usr/local/bin/docker-entrypoint.sh

<= /div>
--000000000000f2041b062847cab6--