I'm currently using docker on Windows 10 through the WSL. I've developed an application in Linux natively, and there I was able to access the container through the browser with something like http://10.5.0.2:8088. It happens that when I to do the same using the WSL + Ubuntu, the only thing that I manage to do is http://localhost:8088.
For now, this doesn't appear to be a problem, but since I'm working simulating a cluster, it would be better to avoid this kind of thing to not have port conficts in the future.
To illustrate: I'm defining a stack with something like
version: "3.7"
services:
spark-master:
image: master
container_name: spark-master
hostname: spark-master
tty: true
depends_on:
- spark-worker-1
- [...]
ports:
- "8088:8088"
- "50070:50070"
- "50030:50030"
- "8080:8080"
- "8042:8042"
- "8888:8888"
- "4040:4040"
networks:
spark-network:
ipv4_address: 10.5.0.2
spark-worker-1:
image: worker
container_name: spark-worker-1
hostname: spark-worker-1
tty: true
ports:
- "8081:8081"
- "6042:8042"
networks:
spark-network:
ipv4_address: 10.5.0.3
networks:
spark-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.5.0.0/16
So, it would be possible to map this to the Windows host, or Docker Desktop with WSL backend doesn't support acessing containers by IP at all?