-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
docker compose config
returns "undefined network default" error when service uses default
network and --compatibility
is applied
#9015
Comments
Facing the exact same issue here, with following
|
right, as we skip normalization, we don't declare the implicit |
@ndeloof Well, as far as I know, you do need to specify |
right, good point |
This issue hits me too. I need to specify default as well as other shared networks that are defined. |
Same here, we reference |
Same problem here. Has anyone found a workaround yet? |
@pabloroman There are some workarounds to try, depending on how you are using
|
The Docker Compose project has moved from v1 to v2. For now, it's still possible to opt-out of v2 and revert to v1 when using Docker for Mac. However this option will likely go away at some point. It's therefore a good idea to ensure GOV.UK Docker works with both versions. As far as I can see, the only compatibility issue that existed is that the `nginx` container attaches to the 'default' network. As I understand it, the network called `default` is no longer implicitly created with Docker Compose v2, so it needs to be defined in the docker compose file. For more info, see: docker/compose#9015 It's not clear when this change happened as it's not documented as a known change: https://docs.docker.com/compose/compose-file/compose-versioning/
The Docker Compose project has moved from v1 to v2. For now, it's still possible to opt-out of v2 and revert to v1 when using Docker for Mac. However this option will likely go away at some point. It's therefore a good idea to ensure GOV.UK Docker works with both versions. As far as I can see, the only compatibility issue that existed is that the `nginx` container attaches to the 'default' network. As I understand it, the network called `default` is no longer implicitly created with Docker Compose v2, so it needs to be defined in the docker compose file. For more info, see: docker/compose#9015 It's not clear when this change happened as it's not documented as a known change: https://docs.docker.com/compose/compose-file/compose-versioning/
The Docker Compose project has moved from v1 to v2. For now, it's still possible to opt-out of v2 and revert to v1 when using Docker for Mac. However this option will likely go away at some point. It's therefore a good idea to ensure GOV.UK Docker works with both versions. As far as I can see, the only compatibility issue that existed is that the `nginx` container attaches to the 'default' network. As I understand it, the network called `default` is no longer implicitly created with Docker Compose v2, so it needs to be defined in the docker compose file. For more info, see: docker/compose#9015 It's not clear when this change happened as it's not documented as a known change: https://docs.docker.com/compose/compose-file/compose-versioning/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it had not recent activity during the stale period. |
1 similar comment
This issue has been automatically closed because it had not recent activity during the stale period. |
Description
When a service uses the
default
network, callingdocker compose --compatibility config
returns an error like:Steps to reproduce the issue:
example.yml
that contains the following:docker compose --compatibility --file example.yml --project-name myproject config
Describe the results you received:
An error is emitted:
Describe the results you expected:
compose should output the effective configuration:
Additional information you deem important (e.g. issue happens only occasionally):
This works as expected in v2.1.1 . I was able to determine via
git bisect
that this regression was introduced with d00eacb, from #8943.Additionally, it should be noted that compose-switch passes
--compatibility
as of docker/compose-switch#21 (included in v1.0.3).Output of
docker compose version
:Output of
docker info
:Additional environment details:
The text was updated successfully, but these errors were encountered: