Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
Moving files into a Docker Data Volume

First I create a volume:

docker volume create --name some-volume

Then I create a file touch ~/somefile.txt

Now I want to move ~/somefile.txt into the root of the volume some-volume. How do I do this?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can do this with a container:

docker run --rm -v `pwd`:/source -v some-volume:/target \
  busybox cp -av /source/somefile.txt /target/somefile.txt

I will also use tar and stdin to pipe files into a remote volume over the docker client/server connection:

tar -cv -C source-dir . | \
  docker run --rm -i -v some-volume:/target busybox tar -xC /target

An export is similar:

docker run --rm -v some-volume:/source busybox tar -cC /source . | \
  tar -xC target-dir
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!