docker-library / docker-library/postgres

Docker default network subnet compatibility

Open
#1,316 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

On Docker Desktop on macOS, the default docker subnet is set to 192.168.65.0/24, but the pg_hba.conf is configured to allow 172.17.0.0/16 as follows:

host all all 172.17.0.0/16 md5

This is raising the exception "no pg_hba.conf entry for host 192.168.65.1" when trying to connect login to Postgres. Shouldn't it change to be compatible with the default docker subnet mask?

Docker Desktop version: 4.38.0 (the issue is not there on 4.37.2 and earlier)
Postgres: 15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking how pg_hba.conf is configured for the Postgres 15 image and compare the allowed 172.17.0.0/16 range with Docker Desktop 4.38.0's reported 192.168.65.0/24 subnet. Reproduce the login failure on macOS, then verify that the resulting configuration permits the reported host without breaking earlier Docker setups.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, postgres, shell
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.