mirror of
https://github.com/inspec/inspec
synced 2024-11-27 23:20:33 +00:00
c067798fc5
This change adds the `docker_service` resource for Docker swarm mode services. This branches off some of the common elements (id, exists) into a `DockerObject` module along with a utility function for parsing the image/repo string. That function was implemented separately by `docker_image` and `docker_container`, now with a third resource, it made sense to consolidate that into an included module. I used the most comprehensive implementation. Existing classes had to be slightly modified for the genericization. Signed-off-by: Matt Kulka <mkulka@parchment.com>
4 lines
547 B
Text
4 lines
547 B
Text
{"ID": "2ghswegspre1", "Name": "service1", "Mode": "replicated", "Replicas": "3/3", "Image": "foo/image:1.0", "Ports": "*:1234->1234/tcp"}
|
|
{"ID": "huhcawfiyddo", "Name": "service2", "Mode": "replicated", "Replicas": "3/3", "Image": "foo/image:1.1", "Ports": "*:1234->1234/tcp"}
|
|
{"ID": "msar8lb56wq2", "Name": "service3", "Mode": "replicated", "Replicas": "3/3", "Image": "bar:latest", "Ports": "*:8000->8000/tcp,*:8001->8001/tcp"}
|
|
{"ID": "mdrfkxckau6c", "Name": "service4", "Mode": "global", "Replicas": "3/3", "Image": "bar:latest", "Ports": ""}
|