docker 保存时访问被拒绝
Access is denied while docker save
我正在尝试在 windows 中保存一张 docker 图像,以便我可以加载到另一个 Linux 框,同时在 windows 中保存图像,我收到一条错误消息,指出无法重命名 docker 临时文件。
我检查了权限一切正常,实际上我可以编辑。非常感谢这里的任何帮助。我正在使用 docker 1.11.0
docker save -o . <imgID>
rename .docker_temp_742575903 .: Access is denied.
没关系,除了路径,我还需要提供 docker 想要创建的新文件名,这不会隐式发生,在我的例子中,我给出了
docker save -o ./<tar name that you wanted docker to create> <imgID>
对于 unix 上的类似问题:
root@linux:/opt/docker# docker save -o ./presto.tar starburstdata/presto
open .docker_temp_359214587: permission denied
作为解决方法,您可以使用不同的语法来保存图像:
root@linux:/opt/docker# docker save starburstdata/presto > presto.tar
root@linux:/opt/docker# ls -l
razem 1356196
-rw-r--r-- 1 root root 1388737024 maj 23 11:16 presto.tar
我 解决方法 linux 上的问题,方法是将当前文件夹权限更改为 777。确保您当前的直接权限:
mkdir ~/docker-images
cd ~/docker-images
chmod 777 ./
sudo docker save <img_id> -o ./<filename>
您没有提供图像名称,它默认创建一些临时名称,但在重命名时会抛出错误。你可以使用这个命令来解决这个问题。
docker save -o <some custom name with path> <imgID or REPOSITORY:TAG>
如果你想在当前目录中创建类似这样的东西
docker save -o ./ubuntu_image.tar ubuntu:latest
or
docker save -o ./ubuntu_image.tar eat546t
如果要在特定位置创建
docker save -o path/of/image/ubuntu_image.tar ubuntu:latest
我正在尝试在 windows 中保存一张 docker 图像,以便我可以加载到另一个 Linux 框,同时在 windows 中保存图像,我收到一条错误消息,指出无法重命名 docker 临时文件。
我检查了权限一切正常,实际上我可以编辑。非常感谢这里的任何帮助。我正在使用 docker 1.11.0
docker save -o . <imgID>
rename .docker_temp_742575903 .: Access is denied.
没关系,除了路径,我还需要提供 docker 想要创建的新文件名,这不会隐式发生,在我的例子中,我给出了
docker save -o ./<tar name that you wanted docker to create> <imgID>
对于 unix 上的类似问题:
root@linux:/opt/docker# docker save -o ./presto.tar starburstdata/presto
open .docker_temp_359214587: permission denied
作为解决方法,您可以使用不同的语法来保存图像:
root@linux:/opt/docker# docker save starburstdata/presto > presto.tar
root@linux:/opt/docker# ls -l
razem 1356196
-rw-r--r-- 1 root root 1388737024 maj 23 11:16 presto.tar
我 解决方法 linux 上的问题,方法是将当前文件夹权限更改为 777。确保您当前的直接权限:
mkdir ~/docker-images
cd ~/docker-images
chmod 777 ./
sudo docker save <img_id> -o ./<filename>
您没有提供图像名称,它默认创建一些临时名称,但在重命名时会抛出错误。你可以使用这个命令来解决这个问题。
docker save -o <some custom name with path> <imgID or REPOSITORY:TAG>
如果你想在当前目录中创建类似这样的东西
docker save -o ./ubuntu_image.tar ubuntu:latest
or
docker save -o ./ubuntu_image.tar eat546t
如果要在特定位置创建
docker save -o path/of/image/ubuntu_image.tar ubuntu:latest