Skip to content

[BUG] docker-compose http: invalid Host header #11154

Description

@AmIaLion

Description

Docker-compose can't build any projects. When i try to build i receive errors:

=> CANCELED [internal] booting buildkit                                                                                                                                                                                         1.8s 
 => => pulling image moby/buildkit:buildx-stable-1                                                                                                                                                                               1.8s
 => CANCELED [internal] booting buildkit                                                                                                                                                                                         1.8s
 => => pulling image moby/buildkit:buildx-stable-1                                                                                                                                                                               1.7s
 => => creating container buildx_buildkit_default                                                                                                                                                                                0.0s
Error response from daemon: Conflict. The container name "/buildx_buildkit_default" is already in use by container "80965e8471a20993e9e32dd156ee5fd86e44ff322dcea1e99899350c743d8e23". You have to remove (or rename) that container to be able to reuse that name.

after rm container i get error:

$ docker-compose up -d --build
[+] Building 0.0s (0/0)                                                                                                                                                                                                               
http: invalid Host header

I have already update(manually reinstall) docker to latest version:

$ docker version 
Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
  
$ docker buildx version
github.com/docker/buildx v0.11.2 9872040

on my prev version i had same problem:

Client:
 Version:           20.10.24
 API version:       1.41
 Go version:        go1.20.7
 Git commit:        297e128
 Built:             Wed Aug 23 20:54:23 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.24
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       5d6db84
  Built:            Wed Aug 23 20:55:00 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.20
  GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc:
  Version:          1.1.5
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0 

Steps To Reproduce

$ docker-compose up -d --build
[+] Building 0.0s (0/0)                                                                                                                                                                                                               
http: invalid Host header

Compose Version

$ docker-compose version
Docker Compose version v2.17.2

Docker Environment

$ docker info
Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 3
  Running: 1
  Paused: 0
  Stopped: 2
 Images: 6
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 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: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc version: v1.1.9-0-gccaecfc
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.2.0-36-generic
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.45GiB
 Name: firdaus-CoreBook-X
 ID: cf623e49-7790-4080-a648-1e5e27b5d354
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions