-
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] <extra_hosts array items[0,1] must be unique> #12155
[BUG] <extra_hosts array items[0,1] must be unique> #12155
Comments
Hello @GuillaumeCisco
|
If I comment this part:
It runs correctly |
as note: in earlier release we only selected a single entry per host name, but this is wrong as extra_host can be repeated to provide alternate IP addresses, see #12088 |
Can you show us how you declare your
in your Can you share with us the full list of resources involved in your configuration, so we'll be able to reproduce? |
@ndeloof @glours no I cannot, and everything is always shared for reproduction. |
|
We are getting the same error. We do not have duplicated docker-compose.yml services:
my-dev-container:
image: ghcr.io/...
depends_on:
- my-mongodb
# ...
# Make host.docker.internal also work on linux
extra_hosts:
- "host.docker.internal:host-gateway"
my-mongodb:
image: mongo:latest
expose:
- 27017
volumes:
- db-data:/data/db
volumes:
db-data:
# ... docker-compose.devcontainer.yml services:
my-dev-container:
extends:
file: docker-compose.yml
service: my-dev-container
volumes:
# Forwarding the SSH agent
- ${SSH_AUTH_SOCK}:/ssh-agent
environment:
- SSH_AUTH_SOCK=/ssh-agent
# security_opt block has to be defined here until this issue is fixed:
# https://github.com/docker/compose/issues/11777
security_opt:
- seccomp:unconfined
- apparmor:unconfined
volumes:
# ...
Using the same workaround as for This behavior changed in the last few days. Before, we did not have any issues with |
Thanks @g-ulli I was able to reproduce with your example 👍 |
Description
Docker compose file is seen as invalid.
code is:
Steps To Reproduce
error message:
validating /home/$USER/Projects/docker-compose.yml: services.foo.extra_hosts array items[0,1] must be unique
Compose Version
Docker Environment
Anything else?
Linked to #11371
The text was updated successfully, but these errors were encountered: