> 技术文档 > docker pull 报错unexpected EOF 解决方案_docker pull unexpected eof

docker pull 报错unexpected EOF 解决方案_docker pull unexpected eof


场景:

自己部署的docker私有仓库registry,在清理镜像后,新推送到registry的镜像会出现unexpected EOF错误,导致无法正常发布应用。
docker pull 报错unexpected EOF 解决方案_docker pull unexpected eof


问题描述

经核查,是因为前几天清理垃圾镜像和docker缓存导致。

解决方案:

1、在服务器执行docker system prune -a (是一个Docker命令,用于清理Docker系统中未使用的镜像、容器、网络和数据卷等资源。这个命令会删除所有未被使用的资源。)

docker system prune -a

2、在服务器重启一下registry容器

docker stop <容器id>docker start <容器id>

最后拉取成功
docker pull 报错unexpected EOF 解决方案_docker pull unexpected eof