我正面临间歇性构建作业失败并出现以下错误。
[0munknown parent image ID sha256:478c35b0xxxxxxxxxxxxxxx
Build step 'Execute shell' marked build as failure
我正面临间歇性构建作业失败并出现以下错误。
[0munknown parent image ID sha256:478c35b0xxxxxxxxxxxxxxx
Build step 'Execute shell' marked build as failure
如果您有一个带有none
名称的图像,那么您需要删除它并重建您的容器。这就是为我解决的问题。
这通常发生在您同时清理 docker 内存时(或有人删除 /var/lib/docker/image/overlay2/imagedb/content 的内容或同时运行 docker system prune),因此您正在构建的图像无法找到存在图像数据的父文件夹。确保这不会同时发生并重新启动构建。
在构建 docker 映像时,我也有同样的担忧。我得到的错误信息如下:
[Docker] ERROR: Failed to create docker image: Could not build image: unknown parent image ID sha256:cc0b3bd844b13a2ebfc6915019a8194538f2d0b41e420b76a20702e985e2a298
ERROR: Build step failed with exception
com.github.dockerjava.api.exception.DockerClientException: Could not build image: unknown parent image ID sha256:cc0b3bd844b13a2ebfc6915019a8194538f2d0b41e420b76a20702e985e2a298
对我有用的只是尝试再次重建图像,并且效果很好。
就这样。
我希望这有帮助
在构建命令行中使用--no-cache标记。
docker build --no-cache -t dockerimagenew:v1 .