0
我已經創建了2個帶有容器服務和安裝docker的windows 2016虛擬機。我已經創建了使用Windows服務器核心映像的示例Web服務器,並使用docker文件將其命名爲Web服務器。如果我運行 Docker運行-it webserver我可以訪問正在運行的網絡服務器。所以我開始安裝Swarm集羣,我使用自己的映像(網絡服務器)創建了網絡和服務。但這些沒有運行它拋出一些錯誤。下面是 我用下面的命令來創建服務細節和網絡Docker羣集REPLICAS 0/1
# Create an overlay network
C:\> docker network create --driver=overlay <NETWORKNAME>
docker service create --name site --endpoint-mode dnsrr --publish mode=host,target=8000 --network winnet --constraint 'node.labels.os==windows' webserver
C:\Users\Administrator>docker service ps site
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
fctwh0m61vdq site.1 webserver:latest WIN-NGCG1EF8Q2E Running Starting 45 seconds ago
l90rlq7yz6c0 _ site.1 webserver:latest WIN-NGCG1EF8Q2E Shutdown Failed 53 seconds ago "starting container failed: co…"
neysybdecy0v _ site.1 webserver:latest WIN-NGCG1EF8Q2E Shutdown Failed 3 minutes ago "starting container failed: co…"
xecfidph7iyy _ site.1 webserver:latest WIN-NGCG1EF8Q2E Shutdown Failed 5 minutes ago "starting container failed: co…"
out16fj1q913 _ site.1 webserver:latest WIN-NGCG1EF8Q2E Shutdown Failed 7 minutes ago "starting container failed: co…"
ckn3ba8t73ar site.3 webserver:latest WIN-GF8BN4SIBQE Running Starting 18 seconds ago
pdpwsq20phzn _ site.3 webserver:latest WIN-GF8BN4SIBQE Shutdown Failed 25 seconds ago "starting container failed: co…"
ib2m7uzhnghh _ site.3 webserver:latest WIN-GF8BN4SIBQE Shutdown Failed 2 minutes ago "starting container failed: co…"
v6qph3v6qx5h _ site.3 webserver:latest WIN-GF8BN4SIBQE Shutdown Failed 4 minutes ago "starting container failed: co…"
tga64plhn6u5 _ site.3 webserver:latest WIN-GF8BN4SIBQE Shutdown Failed 5 minutes ago "starting container failed: co…"
C:\用戶\管理員>泊塢窗服務LS ID Name模式副本IMAGE xh5g1xpndjdg網站複製0/2 Web服務器:最新
docker inspect l90rlq7yz6c0
"Slot": 1,
"NodeID": "xc8o80wq2domhwda4xh4ovxwr",
"Status": {
"Timestamp": "2017-08-07T06:37:22.4187441Z",
> "State": "failed",
> "Message": "starting",
> "Err": "starting container failed: container 746bc44c9252ed579b8c266866e9470312aa89522ef20d0ea9a51c6e7c10a144 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {\"ApplicationName\":\"\",\"CommandLine\":\"top\",\"User\":\"\",\"WorkingDirectory\":\"C:\\\\\",\"Environment\"
:{},\"EmulateConsole\":false,\"CreateStdInPipe\":true,\"CreateStdOutPipe\":true,\"CreateStdErrPipe\":true,\"ConsoleSize\":[0,0]}",
"ContainerStatus": {
"ContainerID": "746bc44c9252ed579b8c266866e9470312aa89522ef20d0ea9a51c6e7c10a144",
"ExitCode": 127
},
"PortStatus": {}
},
"DesiredState": "shutdown",
========================================= ===================
C:\Users\Administrator>docker info
Containers: 13
Running: 2
Paused: 0
Stopped: 11
Images: 5
Server Version: 17.03.0-ee-1
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Swarm: active
NodeID: xc8o80wq2domhwda4xh4ovxwr
Is Manager: true
ClusterID: umonkgidx00chrf82fiah9n33
Managers: 1
Nodes: 2
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.233.131
Manager Addresses:
192.168.233.131:2377
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1480.amd64fre.rs1_release.170706-2004)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 1
Total Memory: 1.999 GiB
Name: WIN-NGCG1EF8Q2E
ID: EAT6:KLZD:BQAY:TXGV:4LR4:POTH:3VSJ:OEQO:TBAN:L322:QFNC:4V3J
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false