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

fix(container): support service:* as network_mode #39

Closed
wants to merge 1 commit into from
Closed

fix(container): support service:* as network_mode #39

wants to merge 1 commit into from

Conversation

trijpstra-fourlights
Copy link

Closes #38

@k9withabone
Copy link
Member

k9withabone commented Dec 19, 2023

Thanks for submitting a PR!

While the compose spec does support service:* for network_mode, podman does not. See the podman run --network documentation. I'm not sure how podman compose handles this, but it would be interesting to know.

One option is to convert it to the container: network mode. That would involve resolving the service name to the container name, however, this is ... difficult. Another option is to have a better error message for service:, suggesting the use of container: instead and linking to the podman docs.

@trijpstra-fourlights
Copy link
Author

Hmm, it seems you are right. However, I am using this in my current compose and running that with podman.

Looking at the PR that introduced this behavior in podman compose, it seems that they are actively rewriting it to container:* in the case of service:*.

Feels like a weird workaround in podman compose. I'll update my compose file then and I guess this PR can then be closed.

Sorry for wasting your time!

@k9withabone
Copy link
Member

Sorry for wasting your time!

No need to be sorry, it wasn't a waste of time 😄 . I enjoy helping people, and it's good to know where the rough edges in podlet are.

I'll close this PR and either you or I can add the more specific error message for the service network mode.

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

Successfully merging this pull request may close these issues.

improve compose network_mode error message
2 participants