Hello There!
I installed Erpnext in a docker container. It runs locally @ https://gestionale.localhost. Now I’m trying to connect to it from other machines on my local network (both cable and wifi) with no success.
I did a little research and ran a docker network inspect erpnext-one
command (where erpnext-one is the name of my container).
It yielded this:
[
{
"Name": "erpnext-one",
"Id": "58c0b3c5462d8e2fcf583263b0c86d544ef23409ae53b6a560b86a37ee636db8",
"Created": "2022-06-14T17:42:36.5909447Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.21.0.0/16",
"Gateway": "172.21.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"86380925f7ceecb40e7414b1e9450c48ba11f3ebe6f727a246f700504a71baed": {
"Name": "erpnext-one-frontend-1",
"EndpointID": "9bfe93d3ecc1d56155bec6c93a07539fcd581787e137e27e122ae6e4c8a5c8ab",
"MacAddress": "02:42:ac:15:00:02",
"IPv4Address": "172.21.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "bench-network",
"com.docker.compose.project": "erpnext-one",
"com.docker.compose.version": "2.6.0"
}
}
]
So I know my container is running in bridge mode. Even though I’m not too confident with the whole concept of docker network drivers I guess this means the container has its own IP address rather than what would happen in host mode where it would be using the IP address of the machine it runs on.
Now, if I try to connect to 172.21.0.2 though, from either the machine running erpnext or any other machine on the network, I don’t get anywhere.
What am I missing? How do I connect to the container from another machine on the local network? And how do I connect to the container from the machine running it using an IP address rather than a URL?
I’m pretty new to docker, hope I’m not missing something too obvious.
TIA
EDIT: Running on Win, but installed through WSL bridged to Docker Desktop for the sake of simplicity, if it’s by any means useful