Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Docker compose build panics in 2.17.2 with DOCKER_BUILDKIT=0 #10412

Closed
jon-v opened this issue Mar 29, 2023 · 0 comments · Fixed by #10423
Closed

[BUG] Docker compose build panics in 2.17.2 with DOCKER_BUILDKIT=0 #10412

jon-v opened this issue Mar 29, 2023 · 0 comments · Fixed by #10423

Comments

@jon-v
Copy link

jon-v commented Mar 29, 2023

Description

After upgrading from 2.16.0-1~ubuntu.22.04~jammy to 2.17.2-1~ubuntu.22.04~jammy on our build/CI server, all pipelines started failing with this error from docker compose build:

panic: assignment to entry in nil map
goroutine 26 [running]:
github.com/compose-spec/compose-go/types.MappingWithEquals.OverrideBy(...)
	github.com/compose-spec/compose-go@v1.13.2/types/types.go:427
github.com/docker/compose/v2/pkg/compose.(*composeService).build.func1({0x22545e0, 0xc0005af6c0}, {0xc0001bea10, 0x3})
	github.com/docker/compose/v2/pkg/compose/build.go:78 +0x834
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
	github.com/docker/compose/v2/pkg/compose/dependencies.go:127 +0x63
golang.org/x/sync/errgroup.(*Group).Go.func1()
	golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
Command exited with non-zero status 2

I found two ways to stop the error from happening:

  1. Remove DOCKER_BUILDKIT=0 from our build script (we are using this because of compose up creates duplicated image ids when using buildkit #9599)
  2. Downgrade to 2.16.0-1~ubuntu.22.04~jammy

Steps To Reproduce

  1. Upgrade to 2.17.2.
  2. Run DOCKER_BUILDKIT=0 docker compose build

Compose Version

2.17.2

Docker Environment

After downgrading the docker compose plugin:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.4
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.16.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 145
  Running: 145
  Paused: 0
  Stopped: 0
 Images: 677
 Server Version: 23.0.2
 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: 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: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-69-generic
 Operating System: Ubuntu 22.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 31.35GiB
 Name: qa-b242c0c
 ID: TMCP:7FGI:RJ2M:VWWN:R3LS:BLPM:ONHL:3IX7:CFTW:6RD7:XWK2:2RGD
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

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

Successfully merging a pull request may close this issue.

1 participant