I'm trying to apply a demo like in the article :
Scale ASP.NET Core Apps with Docker Swarm Mode
Unfortunately after creating and start the service on docker swarm , I couldn't access the api http://localhost:5000/api/token . However, when I call the api in the running container (using docker exec) or creating the service using host mode every thing goes OK.
Note : I'm trying using docker desktop in my local machine , so I enabled swarm mode using the following command
docker swarm init --advertise-addr 192.168.56.1
where 192.168.56.1 is the VirtualBox ip
Edit : Corresponding container:
Service port configuration:
thanks in advance .