Skip to content
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

Update deprecated feature warning with steps to correct behavior #10093

Closed
kmanwar89 opened this issue Dec 18, 2022 · 2 comments · Fixed by compose-spec/compose-go#328
Closed

Comments

@kmanwar89
Copy link

Description

In docker compose, the external.name service configuration has been deprecated. If a compose file contains the legacy syntax, i.e.:

networks:
  default:
    external:
      name: <network name>

a warning message is seen advising the user the feature is deprecated, but no guidance is provided on what the new syntax should be. A user may attempt to simply delete the external line from the compose file, but this does not work for all services. An example of a service that breaks is authentik.

The original warning text is: WARN[0000] network default: network.external.name is deprecated in favor of network.name . I propose the warning message text be updated to advise the user to include external: true in the network stanza to avoid compatibility issues.

The proposed warning message might say: WARN[0000] network default: network.external.name is deprecated. If an external network needs to be defined, use "external: true" in the network stanza

@chr1shung
Copy link

Hi, I came across this issue today and I followed the warning message to update my network:

networks:
  external_network:
    external: true

It did eliminate the warning message but I noticed it also created the <project>_default network additionally.
I tried adding default back:

networks:
  default:
    external_network:
      external: true

But get the following error:

networks.default Additional property edgexpert_edgex-network is not allowed
docker: exit status 15

@ndeloof can you show me how to configure this correctly? Thanks

@ndeloof
Copy link
Contributor

ndeloof commented Mar 29, 2023

networks:
  default:
    name: external_network:
    external: true

see https://github.com/compose-spec/compose-spec/blob/master/06-networks.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants