http: server gave HTTP response to HTTPS client 🐳 Docker

http: server gave HTTP response to HTTPS client (insecure registry)

Docker spoke HTTPS to a registry that only serves plain HTTP — typically a local or lab registry.

Seen on: Docker

Meaning

Docker only uses plain HTTP for registries explicitly listed as insecure-registries (except localhost). Add the registry to daemon.json — or better, put TLS in front of it.

Common causes

  • Local/private registry running without TLS
  • Registry address not in insecure-registries
  • Using the wrong port (HTTP port instead of HTTPS)

⚡ Quick fix

  1. Add "insecure-registries" in daemon.json and restart Docker (lab use only)
  2. Enable TLS on the registry
  3. Use the HTTPS port

Detailed fix by platform

Docker

  1. bash
    # /etc/docker/daemon.json (Docker Desktop: Settings → Docker Engine)
    { "insecure-registries": ["192.168.1.50:5000"] }
    sudo systemctl restart docker

How to diagnose

  1. Registry — curl http://host:5000/v2/ vs https://
  2. Config — docker info | grep -A3 'Insecure Registries'

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.