From acef7fa1111af94a31c19c660d517f7638609e14 Mon Sep 17 00:00:00 2001 From: Kabiru Mwenja Date: Mon, 17 Apr 2023 12:47:17 +0300 Subject: [PATCH] [docker compose yml fix]: Duplicate YAML merge keys `(<<)` are now rejected from v2.17.x (#12428) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5965fdd39b9..537dd7891fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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