Michal Špondr
Michal Špondr

Reputation: 1545

docker build with insecure-registries stopped working in Docker 23

I use custom Docker registries for development and have insecure-registries set in /etc/docker/daemon.json. Everything worked in Docker 20.10.

However, version 23.0.1 won't allow me to docker build (in the Dockerfile, FROM pulls from my insecure Docker registry), it fails with message: "http: server gave HTTP response to HTTPS client"

I've noticed it can be overriden by setting export DOCKER_BUILDKIT=0 to use legacy builder. buildx is a default builder in Docker 23.

docker pull works correctly in this version, just the build fails.

Any ideas what to set? Just to be sure: I don't want to set up certificates, but just ignore the SSL warnings.

Upvotes: 0

Views: 2910

Answers (1)

Xenon
Xenon

Reputation: 304

There is currently a bug in BUILDKIT which ignores insecure registries setting.

Until then you can either downgrade or turn off the BUILDKIT using

export DOCKER_BUILDKIT=0

or by setting

BUILDKIT_NO_CLIENT_TOKEN=true

Upvotes: 1

Related Questions