1

I try to copy the content of a folder (on my server) to my container:

docker cp sonatype-work-backup/* nexus:/sonatype-work/

So I want the content of sonatype-work in my /sonatype-work/ of nexus. But it doesn't work with the * and without the star it's copying the directory sonatype-work-backup inside my sonatype-work directory. I can't perform mv after that.

DenCowboy
  • 13,884
  • 38
  • 114
  • 210
  • see http://stackoverflow.com/questions/22907231/copying-files-from-host-to-docker-container which lists various solutions – user2915097 May 26 '16 at 08:53

1 Answers1

1

you could just mount that directory in your container at run

 docker run -v /sonatype-work-backup:/mnt --name nexus nexus-image

then

docker exec -it nexus bash

and just cp from /mnt to your desired folder

Zeromus
  • 4,472
  • 8
  • 32
  • 40