wget in a container. This is useful if the system you are on does not have an up to date version of wget and you are unable to upgrade. Examples of this might be a shared CI node, a build server that must provide multiple versions of bash, or a Mac.
I also use this and a derivitive container to spin up multiple containers making requests to a service.
docker run --rm \
-it \
jdkelley/wget <wget options>
Most use-cases of wget involve downloading a resource from the internet. To do that, map in the directory as a volume:
docker run --rm \
-v <scripts-directory>:/scripts \
-it \
jdkelley/wget <wget options and parameters>
Here is an example:
docker run --rm \
-it \
-v `pwd`:/downloads \
jdkelley/wget https://github.com/alpinelinux/docker-alpine/blob/da78fcf5c5da55092aa82a97095274b3df648866/x86_64/alpine-minirootfs-3.10.2-x86_64.tar.gz?raw=true
To use this instead of the local version of wget, create an alias:
alias wget="docker run --rm -it -v `pwd`:/downloads jdkelley/wget"
Inspect headers with:
docker run --rm \
-it \
jdkelley/wget --server-response --spider https://google.com
This is deployed on Docker Hub and GitHub Package Registry.
Content type
Image
Digest
Size
2.7 MB
Last updated
almost 7 years ago
docker pull jdkelley/wget