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 1tHrSG-00ALS2-7k for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 21:26:12 +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 1tHrSD-00B5wN-GK for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 21:26:10 +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 1tHrSD-00B5wE-5d for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 21:26:10 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tHrSC-000Xbo-43 for pgsql-general@postgresql.org; Sun, 01 Dec 2024 21:26:09 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5ceb03aadb1so4134074a12.0 for ; Sun, 01 Dec 2024 13:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733088367; x=1733693167; 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=WYUpEqxV/d+eQegGkHJjWkv7TR6ZIhzORNQMTijC1Rc=; b=QmsCQt/We2EYOl4kFvfY4m3ij8MRgoKyYZYmn6EcRdTIZ/CLpn5zeMTlV+B1UXmt6l h7JR4QsansOHfgkcrbwFMICJxyDYlUt/itnRzN+4qgwnYaoWvbYmSsdQFheyUN8GihXa pZ3xQXUAkafelHNHQ0/vElKx7kZjYRUVQmfHqRwmsPSPSGY39nOmGcmrWY7WlhlC7cAi Eur+f3MPShhN6PRwODiaz1u3lSMWUy8tMq7jv27vhnpcXTBA1K413Yho0wiLs2CfZRzM rQ3xiL/qcpAX1NtrhxGV32fhUNiMemJWHE0FPs8wQfg5P2fiQMnHeVAgWj4kn1fRO8/M W0EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733088367; x=1733693167; 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=WYUpEqxV/d+eQegGkHJjWkv7TR6ZIhzORNQMTijC1Rc=; b=jLr5WS2NNjYkHmJeZETBPktPNjKYfOkMGway7rHWems67RoF08xqC6lBwmOzcZrNeB t8sXG1ZpyCBUEeIbzq/IeSQ88+LIXANnQ6qN2fwsFV8Qzu743pV+34Dx/77v660PEOlh MXLJuyqk9003vogDPf+AaCMBArZ2KPIs0Jm97hFpoK+yfUMXutEnA06JrY7Hd/1ZMHhr +57JebJZ5DojUQapO7X/l8kC/Cas68pIXmggL4yTXuByrqiSO3ywiQe10PEI/Ho84Ycz qDV4ImhHUKrN76OxFEZmhNTXx2wA13eni5AVTFrSVHz/hiOZNstodtCyFIVSQCM2wHBo YjUQ== X-Gm-Message-State: AOJu0Yx6/Ln1cyLVBd98qMK3LfMFn4hQumjQZFORau21aj9CB3m+qALZ 1aaiY3cZI5nGlrB4yrV4yTQue8L7JQlRD3Mt93n+WvRkrWW0yPO5C/WxRjiTExdwq8uB8qSjrBC ygoD0XWVDfb5W391hkXM24YUHABaDxWyx X-Gm-Gg: ASbGncvRXSJzr6/bMMsUGxPwbktPTkFwL+E88zs0h2CtK0XEnhOYWey2VhMDp2a/D26 M3jDGEBETr0iKX90I+okApXjC9TVpAh4bCu6gcXtOwZop7a06Go1bRlV2R9A4esMzoQ== X-Google-Smtp-Source: AGHT+IGDOjSEj9/r0XJLavN4ORCkqomqSwMFcI//ju1kF9XuOFEKo0guU0Odx7a9EwhZn1uaO/x2t3tG9X63LSrJmPc= X-Received: by 2002:a05:6402:1618:b0:5d0:d18f:cc64 with SMTP id 4fb4d7f45d1cf-5d0d18fccc6mr5134455a12.4.1733088366501; Sun, 01 Dec 2024 13:26:06 -0800 (PST) MIME-Version: 1.0 References: <1454490.1733083127@sss.pgh.pa.us> In-Reply-To: From: Alexander Farber Date: Sun, 1 Dec 2024 22:25:54 +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="0000000000007329af06283c14dc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007329af06283c14dc Content-Type: text/plain; charset="UTF-8" Yes thank you, I have tried specifying the port at the CLI too... that did not help. But restarting PostgreSQL in my custom /docker-entrypoint-initdb.d/run-after-initdb.sh has helped, even though I am not sure if it is the best way: #!/bin/sh LANGUAGES="de en fr nl pl ru" createuser --username=postgres words psql --username=postgres -c "GRANT USAGE ON SCHEMA public TO words;" psql --username=postgres -c "ALTER USER words PASSWORD 'mypassword';" for L in $LANGUAGES; do createdb --username=postgres --owner=words words_$L cd /dict/$L && psql words_$L < words_$L.sql done # Restart PostgreSQL to make it listen at localhost too pg_ctl --options "-c listen_addresses='localhost'" --wait restart --0000000000007329af06283c14dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ye= s thank you, I have tried specifying the port at the CLI too... that did no= t help.

But restarting PostgreSQL in my custom=C2=A0/docker-entrypoi= nt-initdb.d/run-after-initdb.sh
has helped, even though I am not sure i= f it is the best way:

#!/bin/sh

LANGUA= GES=3D"de en fr nl pl ru"

createuser --u= sername=3Dpostgres words

psql --username=3Dpostgre= s -c "GRANT USAGE ON SCHEMA public TO words;"
psql --us= ername=3Dpostgres -c "ALTER USER words PASSWORD 'mypassword';&= quot;

for L in $LANGUAGES; do
=C2=A0 =C2= =A0 createdb --username=3Dpostgres --owner=3Dwords words_$L
=C2= =A0 =C2=A0 cd /dict/$L && psql words_$L < words_$L.sql
done

# Restart PostgreSQL to make it listen at lo= calhost too
pg_ctl --options "-c listen_addresses=3D'loc= alhost'" --wait restart

--0000000000007329af06283c14dc--