mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Merge pull request #105 from andreasstieger/version-check
Improve version check, fixes #103
This commit is contained in:
commit
a53e1bec44
1 changed files with 5 additions and 1 deletions
|
@ -42,12 +42,16 @@ check_1_6="1.6 - Keep Docker up to date"
|
||||||
docker_version=$(docker version | grep -i -A1 '^server' | grep -i 'version:' \
|
docker_version=$(docker version | grep -i -A1 '^server' | grep -i 'version:' \
|
||||||
| awk '{print $NF; exit}' | tr -d '[:alpha:]-,')
|
| awk '{print $NF; exit}' | tr -d '[:alpha:]-,')
|
||||||
docker_current_version="1.9.1"
|
docker_current_version="1.9.1"
|
||||||
|
docker_current_date="2015-11-09"
|
||||||
do_version_check "$docker_current_version" "$docker_version"
|
do_version_check "$docker_current_version" "$docker_version"
|
||||||
if [ $? -eq 11 ]; then
|
if [ $? -eq 11 ]; then
|
||||||
warn "$check_1_6"
|
warn "$check_1_6"
|
||||||
warn " * Using $docker_version, when $docker_current_version is current."
|
warn " * Using $docker_version, when $docker_current_version is current as of $docker_current_date"
|
||||||
|
info " * Your operating system vendor may provide support and security maintenance for docker"
|
||||||
else
|
else
|
||||||
pass "$check_1_6"
|
pass "$check_1_6"
|
||||||
|
info " * Using $docker_version which is current as of $docker_current_date"
|
||||||
|
info " * Check with your operating system vendor for support and security maintenance for docker"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 1.7
|
# 1.7
|
||||||
|
|
Loading…
Reference in a new issue