I followed this tutorial: https://www.portainer.io/2019/09/deploying-portainer-on-a-pure-windows-2019-swarm-cluster/
Here is the code:
PS C:\Users\Administrator> docker --version
Docker version 19.03.5, build 2ee0c57608
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="cluster_management" dir=in action=allow protocol=TC
P localport=2377
Ok.
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="node_communication_tcp" dir=in action=allow protoco
l=TCP localport=7946
Ok.
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="node_communication_udp" dir=in action=allow protoco
l=UDP localport=7946
Ok.
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="overlay_network" dir=in action=allow protocol=UDP l
ocalport=4789
Ok.
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="swarm_dns_tcp" dir=in action=allow protocol=TCP loc
alport=53
Ok.
PS C:\Users\Administrator> netsh advfirewall firewall add rule name="swarm_dns_udp" dir=in action=allow protocol=UDP loc
alport=53
Ok.
PS C:\Users\Administrator> curl https://downloads.portainer.io/portainer_windows_stack.yml -o portainer_windows_stack.ym
l
PS C:\Users\Administrator> docker stack deploy --compose-file=portainer_windows_stack.yml portainer
Updating service portainer_agent (id: vi5cvjv2wq8ery10p5s4stw05)
Updating service portainer_portainer (id: ykjjq98r2zrtlfdhzgqu1j6gq)
PS C:\Users\Administrator> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
PS C:\Users\Administrator> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
PS C:\Users\Administrator>
All codes ran without any error. Why the portainer does run now?
I don't know what's wrong with this.
However, I followed an unofficial tutorial: https://airdesk.com/2017/10/windows-containers-portainer-gui/
And it finally works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.