-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed as not planned
Labels
Description
Description
Steps to reproduce the issue:
- git clone https://github.com/paroque28/compose-test
- cd compose-test
- pkg/compose-test/main.go
Describe the results you received:
If I comment the following lines of code:
if project.Services[i].CustomLabels == nil {
project.Services[i].CustomLabels = map[string]string{
api.ProjectLabel: project.Name,
}
}
I get the following error:
panic: assignment to entry in nil map
goroutine 1 [running]:
main.readComposeFile({0x1274cf9, 0x12})
/home/pablo/compose-test/pkg/compose-test/main.go:57 +0x49a
main.StartProject({0x1274cf9, 0x12})
/home/pablo/compose-test/pkg/compose-test/main.go:78 +0x1a5
main.main()
/home/pablo/compose-test/pkg/compose-test/main.go:102 +0x29
exit status 2
Describe the results you expected:
Not an error, an initialized custom labels string map
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker compose version
:
github.com/docker/compose/v2 v2.10.2
(paste your output here)
Output of docker info
:
(paste your output here)
Additional environment details:
Related to:
And:
docker/roadmap#387