-
Notifications
You must be signed in to change notification settings - Fork 630
buildx: ERROR: http: invalid Host header #1944
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
Recently Go was updated to check the Host header more carefully.
Docker was updated to fix this by setting the Host header correctly in the client: moby/moby#45942
This fix has not yet made it into buildx. Even if buildx itself is updated, the buildkit container that it uses is the older version.
If the Docker daemon has been built with go 1.20.6, "docker build ." with a very simple dockerfile fails with ERROR: http: invalid Host header
I suggest backporting the fix for this (in the docker client) to buildx and releasing an updated buildkit docker image.
Expected behaviour
docker build . should work correctly with a Docker daemon built with go1.20.6 or newer.
Actual behaviour
The build fails with ERROR: http: invalid Host header
Buildx version
github.com/docker/buildx 6942118 6942118
Docker info
Client:
Version: 24.0.4
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 69421182cac77598aa6bba886f5241d71e57f00a
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.20.0
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 6
Running: 3
Paused: 0
Stopped: 3
Images: 43
Server Version: 24.0.4
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: journald
Cgroup Driver: systemd
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version:
init version:
Security Options:
seccomp
Profile: builtin
Kernel Version: 6.1.36-v8
Operating System: SkiffOS 2023.05-61-g4bf2b080
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.705GiB
Name: pi4-3
ID: 694c133b-2f6e-4f4d-9d7e-11a5d4d22f42
Docker Root Dir: /mnt/persist/skiff/docker
Debug Mode: false
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Builders list
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
default * docker-container
default default error
Configuration
FROM alpine:edge
RUN apk add nano
Build logs
No response
Additional info
No response