-
When running containers via a rootless podman system service, my network configuration will not be applied correctly. This is my
When running a container directly, the configuration is picked up correctly and I can access the host service running on 127.0.0.1:9080. However, when running the same container via a podman system service, I can see that podman tries to apply the configuration, but port 9080 is not available. From reading the debug logs, I suspect it is something related to the network namespaces. It logs Any idea how to fix this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You don't provide how you create the container via the API but based from you logs it uses /v1.41/containers/create which is the docker compat API endpoint and the one default to using the bridge network ( What you would need to do is set the NetworkMode to pasta in your API payload or in containers.conf change the default netns to pasta so the docker endpoint respects that as well
|
Beta Was this translation helpful? Give feedback.
You don't provide how you create the container via the API but based from you logs it uses /v1.41/containers/create which is the docker compat API endpoint and the one default to using the bridge network (
--network bridge
) not the pasta mode (--network pasta
), so if you run your cli with--network bridge
you see the same behavior.What you would need to do is set the NetworkMode to pasta in your API payload or in containers.conf change the default netns to pasta so the docker endpoint respects that as well