chainguard-images / images

Public Chainguard Images
https://chainguard.dev/chainguard-images
Apache License 2.0
542 stars 140 forks source link

Postgres doesn't accept all incoming connections #1103

Closed tyler-harpool closed 1 year ago

tyler-harpool commented 1 year ago

Which image/versions are related to this issue/feature request?

I'm running the following command in WSL2 and it doesn't look like the postgres image is accepting all incoming connections.
Is there a correct way to allow chainguard images to accept all incoming connections?

 docker run --rm -d \
    -v $PWD/data:/var/lib/postgresql/data \
    -e POSTGRES_USER=${DB_USER} \
    -e POSTGRES_PASSWORD=${DB_PASSWORD} \
    -e POSTGRES_DB=${DB_NAME} \
    -p "0.0.0.0:${DB_PORT}":5432 \
    cgr.dev/chainguard/postgres:15.3 -N 1000

This works and behaves as expected:

 docker run --rm -d \
    -v $PWD/data:/var/lib/postgresql/data \
    -e POSTGRES_USER=${DB_USER} \
    -e POSTGRES_PASSWORD=${DB_PASSWORD} \
    -e POSTGRES_DB=${DB_NAME} \
    -p "0.0.0.0:${DB_PORT}":5432 \
    postgres:15.3 -N 1000

Issue/Feature description

No response

amouat commented 1 year ago

We've found a couple of minor issues with this image and should have a new version for you test soon. Apologies for the wait.

rawlingsj commented 1 year ago

Coming back to this, apologies for the delay. This should be fixed now, /var/lib/postgresql/data/postgresql.conf now uses

listen_addresses = '*'

I'm going to close the issue but please re-open if you still experience issues.