def _get_docker_version():
try:
version = quiet_docker.version('-f', '{{.Client.Version}}').strip()
except sh.ErrorReturnCode as e:
version = e.stdout.strip()
# Replacing the -ce in the version with .ce, as the versions in
# https://yum.dockerproject.org/repo/main/centos/7/Packages/
# adhere to this notation
if version.endswith('-ce'):
version = version.replace('-ce', '.ce')
return version
评论列表
文章目录