2

I started a docker instance like so

docker run -it ubuntu:14.04.4 bash

I performed some tasks within the instance and now I'd like to get the resulting files. How do I get the files without using ftp/scp to connect to an external site somewhere else? Is there a way to mount a USB stick or something which could be copied to easily?

4

1 Answer 1

2

I found the answer and it involves using an additional terminal window, hopefully this will help others:

Open a new terminal window and run docker ps to get the container id. with the container id in-hand, using 5d0a816af9a8 for example, use this command to copy the tarball / file you want:

docker cp 5d0a816af9a8:/mybuilddir/myfile.tar.gz /home/me

With /home/me being the destination on the host system.

1
  • Would you accept your own answer as this what worked for you. It will help others find the solution.
    – user.dz
    Jun 13, 2016 at 3:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .