Docker升级后报错:Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39

现象:升级docker后镜像无法导入

原因:

api现在最多只能支持到1.39,但是client是1.40版本的

解决办法:

修改系统环境变量即可

临时:

export DOCKER_API_VERSION=1.39

永久修改:

在/etc/profile和 ~/.bashrc 最后追加一个 export DOCKER_API_VERSION=1.39

vi /etc/profile  #结尾追加
export DOCKER_API_VERSION=1.39
source
/etc/profile #使配置生效
 

猜你喜欢

转载自www.cnblogs.com/wangzy-tongq/p/12945014.html