user5936041
user5936041

Reputation:

Copy files between docker machines

I am trying to copy the files from the default docker-machine to a new docker-machine I have created. I am doing this because the default docker-machine has an abundance of hidden images which I do not feel like deleting by ID, and I have not found any documentation on how to remove these said images.

I am using the command docker-machine scp default:<path to docker-machine> new:<path to newly created docker-machine>

After the command it exits with code 1. Anyone have any insight into why this is happening?

Upvotes: 2

Views: 1012

Answers (1)

VonC
VonC

Reputation: 1323125

the default docker-machine has an abundance of hidden images which I do not feel like deleting by ID

Those looks like dangling images:

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Note: docker scp does not exist. docker-machine scp does.

docker-machine scp default:/home/docker/foo.txt .

That assume you did first:

docker-machine ssh new
cd <path to newly created docker-machine>

Upvotes: 1

Related Questions