I got a similar issue with stack deployment. I end up using the service create command instead of yml file.
Windows Server 2019 docker swarm not working
On the Windows Server 2019 machine with Docker swarm activated, the project in my image file, which I raised directly as a container, works properly,
but when I run it by creating service, it does not work.
The service is being created, the container is being run, but cannot be accessed from the browser with localhost:port or IP-Address:port
Is docker swarm network not working for windows server 2019 or why? can you help?
image file is .net 4.7.2 project
Example docker stack file.
-------------------------------
version: '3.7'
services:
emincrm:
image: eminevimdockertest/crm:v1
deploy:
mode: global
update_config:
parallelism: 2
delay: 5s
order: stop-first
ports:
- "6754:80"
networks:
- eminnetwork
networks:
eminnetwork:
driver: overlay
---------------------------------------------------------------
I looked through the docs but couldn't find a solution....