deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Docker Engine 29.10 drops loopback registry trust when insecure-registries is configured

Docker Engine 29.10 stops treating loopback addresses as insecure registries the moment any insecure-registries entry exists, breaking plain-HTTP pushes to registries on 127.0.0.1.

Docker Engine 29.10 drops loopback registry trust when insecure-registries is configured

A long-standing default, narrowed

Docker Engine has always given local registries an easy ride: addresses inside 127.0.0.0/8 and ::1/128 were automatically treated as insecure registries, so pushing and pulling to a registry bound to the loopback interface over plain HTTP required no configuration. Docker 29.10.0, released on 16 November per the release notes, narrows that default: as soon as you explicitly set insecure-registries in daemon.json or pass --insecure-registry on the command line, the automatic loopback trust goes away.

A dev.to post by alexgeorgiev17 documents what this looks like in practice. The author keeps a test registry on port 5000 and, after upgrading, found that push, pull and login against it all fail with "http: server gave HTTP response to HTTPS client" — the daemon now expects TLS from an endpoint that only speaks plain HTTP. Using localhost instead of 127.0.0.1 fails identically, since it resolves to the same address.

The post verifies the behaviour on the engine rather than trusting the changelog. With no daemon.json present, docker info still reports the loopback CIDRs as trusted. After adding a single entry for a made-up private mirror and restarting, the list comes back empty. The failures are also immediate — 37 to 45 milliseconds — meaning the daemon refuses before the request leaves the machine, so this is not a race against a registry container that is still booting.

Who actually hits it

The trigger is a combination, not a single setting. Any machine that already names a private mirror in insecure-registries — a self-hosted Harbor or Nexus instance, or a plain registry container behind a reverse proxy without a publicly trusted certificate — and that also builds and pushes test images to a loopback registry has both halves without ever deciding to. Laptops and CI runners are exactly that shape.

The scope is narrower than it first appears, though. Pushing to a sibling container's bridge address, such as 172.17.0.3, fails with the same error, but per the post that range was never covered by the automatic loopback trust on any Docker version. Pipelines doing that must already list the address explicitly or they would never have worked, so 29.10 changes nothing for them.

The two workarounds are not equivalent

The release notes' suggested workaround is to add the loopback ranges back explicitly. The post tested both spellings against registries on ports 5000 and 5001:

  • No insecure-registries at all: pushes to both ports succeed.
  • An entry for only the private mirror: both ports fail.
  • The mirror plus 127.0.0.0/8: both ports succeed.
  • The mirror plus 127.0.0.1:5000: only port 5000 succeeds.

The exact-address form reads as the more precise option but fixes one port and nothing else. Setups that run a registry on a different port per branch, test run or CI job need the CIDR.

The certificate is the cheaper option in practice

Both of those are workarounds; the real fix is a certificate the client trusts. The post describes generating a self-signed certificate with a subjectAltName of IP:127.0.0.1 in 0.34 seconds, mounting it into the registry container, and placing the same certificate at /etc/docker/certs.d/127.0.0.1:5000/ca.crt. The whole procedure took 2.7 seconds end to end, after which the push completed over real TLS.

The counterintuitive part is operational. The certificate change takes effect immediately, without restarting the daemon. Every insecure-registries edit, by contrast, required a full restart — and with Live Restore disabled, as is the default, the test registry container did not come back on its own and had to be started manually each time. The one-line JSON edit is the option that briefly takes your containers down; the certificate is not.

One caveat

The author set out to compare release 29.9.1 and 29.10 against an identical daemon.json, side by side, but could not get a second daemon running cleanly and abandoned that comparison. The before-and-after picture therefore rests on the release notes plus the behaviour observed on 29.10 itself.

Why it matters

A point-release upgrade that silently changes daemon defaults tends to surface later as a baffling TLS error, far from any changelog. Knowing the exact trigger — any insecure-registries entry combined with a loopback push — turns that debugging session into a one-line fix or a two-second certificate. The documented workaround also has a trap: the narrower-looking address entry repairs only a single port, so the CIDR is the safer choice when registry ports vary. And the restart asymmetry is worth remembering beyond this bug: certificate changes apply live, while insecure-registries edits take the daemon — and, without Live Restore, your containers — down for a moment.

  • #docker
  • #containers
  • #docker-registry
  • #devops
  • #breaking-change

Related posts