Description
Description
When I run docker compose up --build
, i see this error:
[+] Running 0/0
⠋ Container viva-extensionsbackend-1 Creating 0.0s
⠋ Container viva-mockbackend-1 Creating 0.0s
⠋ Container cool_chatelet Recreate 0.0s
strconv.Atoi: parsing "": invalid syntax
Steps To Reproduce
I have no idea how i got into this state, but I know what the problem is!
I have a container with these labels:
"Labels": {
"com.docker.compose.project": "viva",
"com.docker.compose.service": "electron",
"com.docker.compose.version": "2.12.2"
}
The container does NOT have the label com.docker.compose.container-number
The convergence engine blows up trying to figure out how to deal with this.
Here's the first place it blows up:
compose/pkg/compose/convergence.go
Line 376 in 32ae036
If I change that line to ignore the error, here's the second place it blows up:
compose/pkg/compose/convergence.go
Line 430 in 32ae036
The fix that worked for me locally was to change change getContainers here:
compose/pkg/compose/containers.go
Line 44 in 32ae036
to filter out containers that are missing this label.
Compose Version
available on request
Docker Environment
available on request
Anything else?
No response