Docker Version
It is often the case that there is some minumum Docker version that, possibly for reasons such as feature support or stability, is required to run your application. Below is an example of an analyzer that will parse the output of the docker info
command and display the Docker server version.
analyze:
v1:
- name: docker.version
labels:
iconKey: docker_whale
desiredPosition: "2"
insight:
primary: Docker {{repl .version}}
detail: Docker server version is {{repl .version}}
severity: info
registerVariables:
- name: version
fileMatch:
pathRegexps:
- /docker_info\.json
regexpCapture:
regexp: '"ServerVersion": *"([^"]+)"'
index: 1
evaluateConditions:
- condition:
not:
empty: {}
variableRef: version
insightOnFalse:
primary: "?"
detail: Could not determine docker version
severity: warn
labels:
iconKey: no_docker