[docker compose yml fix]: Duplicate YAML merge keys (<<) are now rejected 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: https://github.com/docker/compose/issues/10411#issuecomment-1488019350
     https://yaml.org/type/merge.html
This commit is contained in:
Kabiru Mwenja
2023-04-17 12:47:17 +03:00
committed by GitHub
parent ac01dbe935
commit acef7fa111
+1 -2
View File
@@ -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