I am sure this was asked a million times but I just cannot find anything online for some reason.
I have two network I created with Podman (similar to Docker).
When I do localhost:9998 it just times out.
So it just can't connect.
Is there a way to create net bridge so that I can curl my container in a specific container network?
UPDATE
[
{
"cniVersion": "0.4.0",
"name": "search",
"plugins": [
{
"bridge": "cni-podman0",
"ipMasq": true,
"ipam": {
"ranges": [
[
{
"gateway": "10.89.0.1",
"subnet": "10.89.0.0/24"
}
]
],
"routes": [
{
"dst": "0.0.0.0/0"
}
],
"type": "host-local"
},
"isGateway": true,
"type": "bridge"
},
{
"capabilities": {
"portMappings": true
},
"type": "portmap"
},
{
"backend": "iptables",
"type": "firewall"
}
]
}
]
From what I was reading I needed to get the gateway IP from
podman network inspect search
It was: 10.89.0.1
When I CURL that IP it still didn't work.
But then I found this in the IPtables :
The IPs 10.89.0.20 and 10.89.1.2 are the IPs for my host to have access to each of the podman networks.
You can use
podman inspect <container-name>
to get the IP Address of the container.This command here returns just the IP address: