Docker Community Forums

Share and learn in the Docker community.

Docker inspect scoping / what have i inspected?

docker
swarm

(Ac427) #1

What am inspecting?

docker inspect test.1.3bbgpl5q7uz5j6vwbu4947jy8 Gives the individual replica’s output, i think.

docker inspect 3bbgpl5q7uz5j6vwbu4947jy8 - Produces a summary (output at bottom of post) of something but what am i actually inspecting, the service as a whole ?

docker service ls
ID NAME MODE REPLICAS IMAGE PORTS

yufvrtan99xk test replicated 3/3 httpd:latest

docker service ps test --filter “desired-state=running” --no-trunc

ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS 3bbgpl5q7uz5j6vwbu4947jy8 test.1 httpd:latest docker1 Running Running 12 minutes ago da9xtqsigmcd2lqotduhtj8a4 test.2 httpd:latest docker1 Running Running 11 minutes ago ufxyali9tmfrwhysapi9oza7b test.3 httpd:latest docker3 Running Running 11 minutes ago

docker inspect 3bbgpl5q7uz5j6vwbu4947jy8 [ { "ID": "3bbgpl5q7uz5j6vwbu4947jy8", "Version": { "Index": 1056 }, "CreatedAt": "2018-02-02T17:53:06.609951592Z", "UpdatedAt": "2018-02-02T17:53:07.278813974Z", "Labels": {}, "Spec": { "ContainerSpec": { "Image": "httpd:latest", "DNSConfig": {}, "Isolation": "default" }, "Resources": { "Limits": {}, "Reservations": {} }, "Placement": {}, "ForceUpdate": 0 }, "ServiceID": "yufvrtan99xksxon00s7mp7yk", "Slot": 1, "NodeID": "34p3y6qgrirkla65dr89cn4uu", "Status": { "Timestamp": "2018-02-02T17:53:07.197930166Z", "State": "running", "Message": "started", "ContainerStatus": { "ContainerID": "332a0018412d3bcf17215240b421ac9804bd99adc172f57f34912002e997122a", "PID": 107479 }, "PortStatus": {} }, "DesiredState": "running" } ]