docker open /var/lib/docker/tmp no such file or directory


原因是:redis.tar压缩包出现了问题,换个docker的redis.tar的压缩包吧。
顺便从网上找几个同类问题可能的解决方案供参考,我是没用过,我这边出现这个问题确实是包在保存途中出现问题了。毕竟像系统镜像类的都会出问题。

地址:https://bbs.csdn.net/topics/391860959?page=1

下面是个英文的 地址:https://webkul.com/blog/error-open-var-lib-docker-tmp-docker-import/
Today I face an error when I was trying to import an image by using following steps,

Switch to image directory path,
1
cd docker/directory/image-path
Then run load command to import docker image in my system,
1
cat docker_custom_image.tar | docker load
After running load command I was getting an error,
“open /var/lib/docker/tmp/docker-import-622414428/bin/json: no such file or directory”

Then a bit searching and research I found few solutions to import the image,

You can fix this issue by creating the tmp folder inside /var/lib/docker/.
(In my case this solution doesn’t work so I made a bit more research and find the solution.)
I use below command in order to import the image.
1
cat docker_custom_image.tar | docker import - custom_docker/image
This ends up with the image showing up in

1
docker images

So this is how I found the solution to fix this issue but there is a question in everyone’s mind that why I was getting this issue?

It is because I was using docker load command to import image export by docker export command.

1
cat image-file |docker load
Would only work if the image is created as a layered docker image, not as a tar ball.

Basically correct way to import the image,

Use docker import for image exported by docker export.

Use docker load for image exported by docker save.

We would love the hear your thoughts, suggestions, and questions in the comments below !!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值