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

Support IPv6 address enclosed in brackets for ports short syntax in compose file #96

Open
TeamLinux01 opened this issue Aug 4, 2024 · 4 comments
Labels
blocked Waiting on something else to resolve bug Something isn't working
Milestone

Comments

@TeamLinux01
Copy link

I have a valid podman compose file that has these ports:

- "[fd7a:115c:a1e0:0:0:0:9f01:c080]:80:80"
- "[fd7a:115c:a1e0:0:0:0:9f01:c080]:443:443"
- "[fd7a:115c:a1e0:0:0:0:9f01:c080]:443:443/udp"

Starting the pods with podman-compose, it binds the ports to the IPv6 address without issue.

When I run podlet compose, it errors with

error parsing host ip address: invalid IP address syntax at line

the line is the first instance of the IPv6 address for ports.

Not sure if I should be using a different format for IPv6 port publishing or if it is just a bug in the parser.

@TeamLinux01
Copy link
Author

In the meantime, I manually removed the IPv6 addresses, created the .container file and then added them back.

PublishPort=[fd7a:115c:a1e0:0:0:0:9f01:c080]:80:80
PublishPort=[fd7a:115c:a1e0:0:0:0:9f01:c080]:443:443
PublishPort=[fd7a:115c:a1e0:0:0:0:9f01:c080]:443:443/udp

the container starts and publishes without issues.

@k9withabone
Copy link
Member

I dug into this a bit. It looks like the brackets around the IPv6 address are the problem. docker compose config seems to accept the address either way, but it's not specified in the Compose Specification. The only part that mentions IPv6 addresses may be enclosed in brackets is the extra_hosts short syntax description.

I'll make an issue or PR in the Compose Specification repo and also an issue for my compose_spec library.

@k9withabone k9withabone added bug Something isn't working blocked Waiting on something else to resolve labels Sep 15, 2024
@k9withabone k9withabone added this to the v0.3.1 milestone Sep 15, 2024
@k9withabone k9withabone changed the title Podlet reports error when trying to publish to IPv6 address Support IPv6 address enclosed in brackets for ports short syntax in compose file Sep 15, 2024
@k9withabone
Copy link
Member

Blocked on k9withabone/compose_spec_rs#24.

@k9withabone
Copy link
Member

Created compose-spec/compose-spec#530.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting on something else to resolve bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants