Giter VIP home page Giter VIP logo

Comments (8)

dfandrich avatar dfandrich commented on August 21, 2024 1

from curl-docker.

xquery avatar xquery commented on August 21, 2024

thx for taking the time to raise an issue.

as an alternate approach, have you tried pipe redirection to save file from the docker run command ?

for example:

> docker run --rm curlimages/curl:7.67.0 https://www.google.com/humans.txt > humans.txt

would save a file to humans.txt onto the docker host.

otherwise you are attempting to save a file into the container itself eg. try ~/humans.txt which would save file to user directory (which you should have perms for) in that container ... you would then need to use docker cp to copy that file from the container to the host machine.

from curl-docker.

silvioprog avatar silvioprog commented on August 21, 2024

@xquery thanks for the feedback! :-)

Hmm, I never used > to save (big) files from curl. Maybe using VOLUMEs could be better as suggested by @dfandrich .

If you want, I'm ready to send a PR allowing to use VOLUMEs. :-)

from curl-docker.

xquery avatar xquery commented on August 21, 2024

unless I am missing something - I do not believe any additional work is required for using volumes as per @dfandrich example.

docker run -v /tmp:/tmp curlimages/curl:7.67.0 https://www.google.com/humans.txt --output /tmp/humans.txt

This nicely illustrates how curl downloads file which should exist in the host machine's /tmp directory.

Considering you have several options that work today I am going to close this issue.

from curl-docker.

lonix1 avatar lonix1 commented on August 21, 2024

Hi @xquery @silvioprog

docker run -v /tmp:/tmp curlimages/curl:7.67.0 https://www.google.com/humans.txt --output /tmp/humans.txt

Has something changed since you posted that, since it gives me the error too. (Permission denied).

from curl-docker.

xquery avatar xquery commented on August 21, 2024

no ... and defo nothing has changed with 7.67.0 (previous version) ... sounds like a perms issue with your mount (try a different dir then /tmp ... which might have some expectations).

from curl-docker.

lonix1 avatar lonix1 commented on August 21, 2024

@xquery Good advice, thanks!

from curl-docker.

maaft avatar maaft commented on August 21, 2024

Uhm, it gives me also the same error.

docker run -v $(pwd):/some-arbitary-mount-point -it curlimages/curl -L --output /some-arbitary-mount-point/test.tar "example.com/file.txt"

from curl-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.