Skip to content

Instantly share code, notes, and snippets.

@duglin
Created July 13, 2016 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duglin/567ebb388ea3bf8a6b528e3c3246d7a4 to your computer and use it in GitHub Desktop.
Save duglin/567ebb388ea3bf8a6b528e3c3246d7a4 to your computer and use it in GitHub Desktop.
$ docker -H 172.20.0.2:2375 service create --name foo --network swarmnet ibmdojo/mini
25w9xluukxsnxo9ie38s8a4ho
$ docker -H 172.20.0.2:2375 service create --name foo1 ibmdojo/mini
65jv5y7ai4kx3qdf0p3qlzexv
$ docker -H 172.20.0.2:2375 service inspect foo foo1
[
{
"ID": "25w9xluukxsnxo9ie38s8a4ho",
"Version": {
"Index": 25
},
"CreatedAt": "2016-07-13T14:20:27.576086565Z",
"UpdatedAt": "2016-07-13T14:20:27.577044471Z",
"Spec": {
"Name": "foo",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ibmdojo/mini"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
},
"Placement": {}
},
"Mode": {
"Replicated": {
"Replicas": 1
}
},
"UpdateConfig": {},
"Networks": [
{
"Target": "1my8ssmx36dm7p6aywtukppq3"
}
],
"EndpointSpec": {
"Mode": "vip"
}
},
"Endpoint": {
"Spec": {
"Mode": "vip"
},
"VirtualIPs": [
{
"NetworkID": "1my8ssmx36dm7p6aywtukppq3",
"Addr": "10.0.0.2/24"
}
]
}
},
{
"ID": "65jv5y7ai4kx3qdf0p3qlzexv",
"Version": {
"Index": 29
},
"CreatedAt": "2016-07-13T14:20:27.614555292Z",
"UpdatedAt": "2016-07-13T14:20:27.614555292Z",
"Spec": {
"Name": "foo1",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ibmdojo/mini"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
},
"Placement": {}
},
"Mode": {
"Replicated": {
"Replicas": 1
}
},
"UpdateConfig": {},
"EndpointSpec": {
"Mode": "vip"
}
},
"Endpoint": {
"Spec": {}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment