Skip to content

Commit

Permalink
Add docker checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mkumatag committed Aug 29, 2018
1 parent a70044a commit 59dc8ed
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions anago
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,27 @@ check_prerequisites () {

security_layer::auth_check 2 || return 1

logecho -n "Checking Docker version: "
docker_version=$(docker version --format '{{.Client.Version}}' | cut -d"-" -f1)
if [[ ${docker_version} != 18.06.0 && ${docker_version} < 18.06.0 ]]; then
logecho "Minimum docker version 18.06.0 is required for " \
"creating and pushing manifest images[found: ${docker_version}]"
return 1
fi
logecho -r "$OK"

# TODO: Remove this section once docker manifest command promoted
# from Experimental
logecho -n "Checking Docker CLI Experimental status: "
cli_experimental=$(docker version --format '{{.Client.Experimental}}' | cut -d"-" -f1)
if [[ "${cli_experimental}" == "false" ]]; then
logecho "Docker Client Experimental flag is false, should be enabled to " \
"push the manifest images"
logecho "More info: https://docs.docker.com/edge/engine/reference/commandline/manifest_create/"
return 1
fi
logecho -r "$OK"

if ! ((FLAGS_gcb)); then
ensure_gcp_users || return 1
fi
Expand Down

0 comments on commit 59dc8ed

Please sign in to comment.