Docker image for running HTTPie and curl in a "clean" environment
1.1K
latest (Dockerfile)Cleanroom is a utility that we use in order to run curl and httpie without having to install and configure them on the host machine.
From the official website:
curl is used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications totally affecting more than one billion users.
From the official readme:
HTTPie (pronounced aych-tee-tee-pie) is a command line HTTP client.
Its goal is to make CLI interaction with web services as human-friendly as possible. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized responses. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.
$ docker pull embrasure/cleanroom
For ease of use, it is recommended that you configure an alias for the one or more of the following commands:
$ alias curl='docker run -it --rm embrasure/cleanroom curl'
$ alias http='docker run -it --rm embrasure/cleanroom http'
If you wish for this alias to persist on reboot, you can append this line to your ~/.bashrc (or similiar file):
$ alias curl >> ~/.bashrc
$ alias http >> ~/.bashrc
$ docker run -it --rm embrasure/cleanroom curl -X GET https://example.org
$ docker run -it --rm embrasure/cleanroom http https://example.org
$ docker run -it --rm -v $(pwd):/scratch embrasure/cleanroom curl -L https://commons.wikimedia.org/wiki/Example_images#/media/File:Example.jpg -o Example.jpg
$ docker run -it --rm -v $(pwd):/scratch embrasure/cleanroom http -d https://commons.wikimedia.org/wiki/Example_images#/media/File:Example.jpg -o Example2.jpg
$ docker run -it --rm -v /yourcertlocation/:/usr/local/share/ca-certificates/ -e CUSTOM_CA=true embrasure/cleanroom curl -X GET https://example.org
$ docker run -it --rm -v /yourcertlocation/:/usr/local/share/ca-certificates/ -e CUSTOM_CA=true embrasure/cleanroom http https://example.org
Content type
Image
Digest
Size
29.2 MB
Last updated
almost 10 years ago
docker pull embrasure/cleanroom