Comments (8)
from curl-docker.
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.
@xquery thanks for the feedback! :-)
Hmm, I never used >
to save (big) files from curl. Maybe using VOLUME
s could be better as suggested by @dfandrich .
If you want, I'm ready to send a PR allowing to use VOLUME
s. :-)
from curl-docker.
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.
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.
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.
@xquery Good advice, thanks!
from curl-docker.
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)
- research Docker Content Trust (DCT) HOT 2
- docker.cmd in LABEL isn't docker.io/curlimages/curl HOT 1
- Curl is not updating to latest version HOT 1
- update the alpine base image from 3.14.0 to 3.14.1 HOT 2
- container fails to create in Kubernetes cluster with a runAsNonRoot PSP
- Bumping alpine to 3.14.3 or 3.15.0 HOT 1
- Dns resolution problem with Alpine and Kubernetes HOT 6
- investigate pushing to alternate public repos HOT 4
- CVE-2020-28928 (Low Severity) in curlimages/curl:7.81.0
- CVE-2022-0778 - bump alpine to 3.15.2
- Use environemnt variables in command HOT 1
- Include OpenSSL
- Add bash as shell alternative
- CVE-2022-37434-zlib found in curl image HOT 3
- [7.86.0] environment variable is ignored. HOT 2
- support HTTP/3
- Missing manifest for tag 7.88.1 (latest) HOT 1
- `curlimages/curl:8.1.0` fails to load a p12 certificate that `8.00.1` could HOT 5
- curlimages/curl:8.1.0 fails on a simple GET HOT 3
- Bump to 8.1.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-docker.