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

Don't share the options map #10151

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Don't share the options map #10151

merged 1 commit into from
Jan 9, 2023

Commits on Jan 9, 2023

  1. Don't share the options map

    Without this I get an exception when building multiple images in a
    compose run.
    
    ```
    fatal error: concurrent map writes
    
    goroutine 16 [running]:
    github.com/docker/compose/v2/pkg/compose.(*composeService).build.func1({0x2cba4e0, 0xc00019b2c0}, {0xc000233150?, 0xd?})
            github.com/docker/compose/v2/pkg/compose/build.go:95 +0x652
    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
    ...
    ```
    
    I'm not sure why the map is currently shared, but with this patch
    applied my docker-compose build run works.
    
    Signed-off-by: Edward Muller <emuller@fastly.com>
    freeformz authored and glours committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    73ebbff View commit details
    Browse the repository at this point in the history