Skip to content

Commit

Permalink
[docker compose yml fix]: Duplicate YAML merge keys (<<) are now re…
Browse files Browse the repository at this point in the history
…jected from v2.17.x (#12428)

fix: Replace unsupported repeated yaml anchors with merge

`docker compose` v2.17.2 fails with the following syntax error due to
go/yaml/v3 update.

```sh
❯ docker compose config
yaml: unmarshal errors:
  line 40: mapping key "<<" already defined at line 39
  line 40: mapping key "<<" already defined at line 39
  line 40: mapping key "<<" already defined at line 39
```

"goyaml/v3 does not support repeated anchors (due to internal storage
using << as key during parsing) but allows use of multi-values in
anchors"

See: docker/compose#10411 (comment)
     https://yaml.org/type/merge.html
  • Loading branch information
akabiru authored Apr 17, 2023
1 parent ac01dbe commit acef7fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ x-op-backend: &backend
build:
<<: *build
target: develop
<<: *image
<<: *restart_policy
<<: [*image, *restart_policy]
environment:
LOCAL_DEV_CHECK: "${LOCAL_DEV_CHECK:?The docker-compose file for OpenProject has moved to https://github.com/opf/openproject-deploy}"
RAILS_ENV: development
Expand Down

0 comments on commit acef7fa

Please sign in to comment.