4

I am trying to save a Docker image inside VM so that I can load to my windows. While saving the images, I got an error stating "permission is denied" to create a .tar file.

docker save -o /mnt/sda1/var/lib/docker/tensorflow.tar user/tensorflow-serving-devel

user/tensorflow-serving-devel is the image ID here . Trying this gave me:

open /mnt/sda1/var/lib/docker/.docker_temp_783580193: permission denied.

I am using Docker Toolbox here. I referred to this question to create the .tar file.

enter image description here

Edit : I created the file .tar by

docker@default : docker save -o tensorflow.tar user/tensorflow-serving-devel
docker@default : ls \
>
tensorflow.tar
docker@default : docker cp tensorflow.tar /c/Users/usr/Downloads/

Error:

must specify at least one container source

How do I copy this .tar file that container image?

halfer
  • 19,824
  • 17
  • 99
  • 186
dhinar1991
  • 831
  • 5
  • 21
  • 40
  • You can try using FileZilla or any other software to connect to SFTP in the VM. use docker/docker or docker/tcuser with port 22 on the VM's IP address. – fly2matrix May 07 '18 at 04:38
  • docker cp copy files from host to container or container to host , and it can not use it to copy from VM to HOST machine. – fly2matrix May 07 '18 at 04:51
  • 1
    if you can browse "/c/Users/usr/Downloads/" inside VM then use simple COPY command to copy tar file into this directory. – fly2matrix May 07 '18 at 04:52

2 Answers2

1

You can specify the container source as follows in your case:

docker cp tensorflow.tar tensorflow-vm:/c/Users/usr/Downloads/

Where tensorflow-vm is the example name of your container, what can be found using

docker ps -a
eapo
  • 1,053
  • 1
  • 19
  • 40
-1

U can use Docker Swarm to add config.

cryptoparty
  • 345
  • 1
  • 5
  • 20