cernopendata / cernopendata-client

CERN Open Data command-line client
http://cernopendata-client.readthedocs.io/
GNU General Public License v3.0
10 stars 9 forks source link

Download with docker - where do the files go? #126

Open katilp opened 1 year ago

katilp commented 1 year ago

What happens?

Download through docker claims success but the files are not there.

How to reproduce?

$ ls
README.md
$ docker pull cernopendata/cernopendata-client
$ docker run -i -t --rm cernopendata/cernopendata-client version
0.3.0
$ docker run -i -t --rm cernopendata/cernopendata-client download-files --recid 1002 --protocol xrootd
==> Downloading file 1 of 1
  -> File: ./1002/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt
==> Success!
$ ls
README.md
$ docker run -i -t --rm cernopendata/cernopendata-client download-files --recid 1002 --protocol http
==> Downloading file 1 of 1
  -> File: ./1002/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt
  -> Progress: 35/35 KiB (100%)
==> Success!
$ ls
README.md
katilp commented 1 year ago

If the expected usage is the following, maybe then update the docs

$ docker run -i -t --rm  -v $PWD:/code cernopendata/cernopendata-client download-files --recid 1002
==> Downloading file 1 of 1
  -> File: ./1002/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt
  -> Progress: 35/35 KiB (100%)
==> Success!
$ ls
1002  README.md
$ ls 1002
Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt
tiborsimko commented 1 year ago

Yes, the files are downloaded into the container, so mounting a local volume inside the container is the way to go. We'll update the docs.