-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[BUG] Regression: array items[0,1] must be unique starting from 2.24.1 #11371
Comments
Thanks for reporting. |
Thank you for getting back to me so promptly, @ndeloof. In my case, there seems to be no valid reason for the issue I'm facing. It appears to be a chain of docker-compose files where the last one is adding the same volumes again. Unfortunately, I cannot modify it as the base docker-compose files are managed by a custom framework. In version <= 2.23, errors were ignored or overwritten silently. However, this is no longer the case, resulting in a breaking change. |
ok, just wanted to check I was not missing a hack-ish usecase :) |
Thanks @ndeloof :) |
I'm also getting a (possibly similar) regression with the following as a single file, but the same error message. I can also build this successfully with 2.23.3 - the uniqueness constraint here is too strict as the two OpenSearch containers in this compose file are for different services:
|
@freyjadomville same PR will fix your issue, but in the meantime you just can remove redefinition of environment in |
I get the same for ports. port 1514/tcp in both docker-compose.yml AND override. |
@logopk same fix will apply. Any reason you use this duplicated declaration ? |
@ndeloof : I can not tell you exactly. As this is on my test environment this port may have been in the override first and then later got into the regular prod compose file. same applies to the volume problem - however there it was also needed for the external:true declaration. |
Thanks a lot @ndeloof |
This commit resovles the issue described in: <docker/compose#11371>
This commit resovles the issue described in: <docker/compose#11371>
So, this is same thing? validating /root/qfieldcloud/docker-compose.override.local.yml: services.app.environment array items[1,46] must be unique
|
Hello all, This is just in case this scenario was not covered by PR 533. Here is a simple case where docker compose complains about the main.yml
secondary.yml:
command:
Edit: |
This is working fine with v2.24.2 - the duplicate environment entries is working too, so the fix did cover that. |
My company are running Docker Desktop on Mac and we got affected by this bug without even changing docker desktop version, how is that possible? The latest version used by Docker Desktop according to their release notes are: v2.23.3 |
@rappzons seems like you got docker compose installed manually, check docker desktop menu : |
Update: This was our docker-in-docker setup that had downloaded the latest version of docker-compose, sorry for the confusion. Thanks for the response @ndeloof . Seems like I don't have that option. Perhaps because I've got the free version. It really looks like I'm running 2.23.3 of compose. Perhaps this is not the best thread for this :D but I found it really weird that I'm affected by this issue. |
Right. The issue continues appearing with main.yml: name: my-project
services:
myfirstservice:
image: alpine:latest
myservice:
image: alpine:latest
environment:
- MYVAR=MyVarValue
links:
- myfirstservice
profiles:
- profile1
- profile2 secondary.yml: cat secondary.yml
name: my-project
services:
myservice:
extends:
file: ${PWD}/main.yml
service: myservice command:
|
Yeha, also here... |
Here the very same issue with |
Even with |
@ihor-sviziev this is a local build, not signed/certified. You need to go to system preference/security to approve running such "unsecure" software - or wait for next release delivered by Docker Desktop :) |
@ihor-sviziev yes because the signature of the binary for MacOs is done as part of the Docker Desktop release, you have to approve it manually in |
@glours I can confirm, the fixed version fixes this issue for me. |
@ihor-sviziev thanks for the feedback |
@glours the new fixes should be included in https://github.com/docker/compose/releases/tag/v2.24.4? |
@matanmarciano yes |
@glours it is still not released to: https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/ |
@matanmarciano no indeed, a release of https://github.com/docker/docker-ce-packaging is planned later this week |
@glours, I just received the Docker Desktop update to v4.27.1, but unfortunately, the fixed version of docker-compose wasn't included for some reason. When can we expect it? |
@ihor-sviziev Yes they decided to focus on the security fixes for this release, a next patch release of Docker Desktop is planned for next week... Sorry for the delay, anyway you can add manually the binary of Compose |
I had |
Hello again. I'm afraid there is now a port conflict error when the containers get into running mode. Try this: main.yml:
secondary.yml:
If you run the command of If you run the command by using both the configuration files,
Versions used:
|
Docker Desktop 4.27.2 luckily fixed the issues for us! |
Is this released? No milestone assigned... |
@k1w1m8 those fixes have been released in Compose v2.24.4 |
I don't mean to be a pain here, but I'm seeing similar on v2.25.0. Figured best to post on this thread versus a new issue as it seems related to my newb self? "validating /home/docker/docker-compose.override.yml: services.scrutinyanalogj.devices array items[0,11] must be unique"
|
@derekcentrico tried to reproduce, works for me:
|
Thanks for checking. You led me down the ultra newb path of a reboot. I don't understand how that mattered for anything as all was fine previously+ had just rebooted after an apt upgrade but hey it works now! |
I recently had the Here is a minimal configuration where this happens:
|
I'm getting this error also for I have the following in both services:
traefik:
security_opt:
- label:type:container_runtime_t Is this expected or is this a bug? (This bug or a new one? :D) |
@YtvwlD please open a new bug for this |
I still experiment the issue with:
error message:
Should have been resolved? |
@GuillaumeCisco sounds like a separate, while comparable issue related to extra_hosts. Please fill a new issue so we can investigate |
Thanks @ndeloof ,w ill do right away ;) |
Description
As per the subject, starting from 2.24.1, I am encountering this issue when there are overrides.
Steps To Reproduce
Create 2 files:
WIth 2.23.3:
With 2.24.1:
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: