-
Notifications
You must be signed in to change notification settings - Fork 487
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
network_mode
/--network
should be applied to pod instead of container
#316
Comments
--network
should be applied to pod instead of containernetwork_mode
/--network
should be applied to pod instead of container
network_mode
/--network
should be applied to pod instead of container--network
should be applied to pod instead of container
--network
should be applied to pod instead of containernetwork_mode
/--network
should be applied to pod instead of container
Is having the client IP always be 10.0.2.100 in my nginx logs somehow a desirable use case? How am I supposed to run analytics on that? Anyway a hacky workaround is to just make the pod by hand first, then use podman-compose to bring the rest up:
|
please try the latest podman-compose from v1.x branch |
Nicce, this sounds awesome! So further podman-compose don't need that |
yes even in rootless |
Similar to #314 and as a result of containers/podman#10878 and other's, i.e. two use cases of actually getting the correct IP and being able to access the localhost of the host (without
host
networking) forced me to use such a YAML with a special podman network mode calledslirp4netns
withallow_host_loopback
andport_handler=slirp4netns
.The only alternative is to use
host
networking, which the doc (IMHO correctly) says is "considered insecure"…STR
So, here is a YAML:
What happens
This starts up like this:
The problem here is that the pod does not use
--network slirp4netns:port_handler=slirp4netns,allow_host_loopback=true
, but only the container. This means the container's networking is totally off…What should happen
When you run this, it works as it moves the network option to the pod
--network slirp4netns:port_handler=slirp4netns,allow_host_loopback=true
and the container seems to use the correct networking and both things work.Workaround (failed)
Now I saw #283, so i tried this:
Also adding
-t identity
does not help.However, just using
-t identity
does help, of course, as I only have one container in my YAML file. But well… that is more of a workaround is not it?In other ways: How can I get it to work as expected (see above), respectively can it be changed to always work like this? Because what it currently does by applying the
network_mode
only to the container is of course never useful I guess and just creates (unexpected) network errors. (.e.g the ports are then just not exposed or so)System
same as in #314, basically
The text was updated successfully, but these errors were encountered: