httpie running in docker alpine (python3+pip3+alpine+httpie)
Auto-trigger docker build for httpie when new release is announced
https://github.com/alpine-docker/httpie
https://travis-ci.org/alpine-docker/httpie
https://hub.docker.com/r/alpine/httpie/tags/
This is personal project to build httpie in alpine linux.
$ alias http='docker run -ti --rm alpine/httpie'To use and persist a .netrc file:
$ alias http='docker run -ti --rm -v ~/.netrc:/root/.netrc alpine/httpie'A .netrc file must exist at ~ on the host.
/root/.netrc is used because httpie is run as root in the container, and it
looks to the user's home directory (/root) for the .netrc file.
To use and persist a .httpie configuration
directory:
$ alias http='docker run -ti --rm -v ~/.httpie:/root/.httpie alpine/httpie'The ~/.httpie directory on the host will be created automatically if it does
not exist already. You will notice a ~/.httpie/config.json is created by
httpie if one did not exist.
This will create a temporary alias. In order to make it persist reboots,
you can append this exact line to your ~/.bashrc (or similar) like this:
$ alias http >> ~/.bashrcRunning HTTPie is as simple as invoking it like this:
From the official examples:
Hello World:
$ http httpie.orgCustom HTTP method and headers:
$ http PUT example.org X-API-Token:123 name=JohnSubmitting forms:
$ http -f POST example.org hello=WorldUpload a file using redirected input:
$ http example.org < file.jsonDownload a file and save it via redirected output:
$ http example.org/file > fileYou can supply any number of HTTPie arguments that will be passed through unmodified.
HTTPie has a fairly extensive documentation available. Also, you can use its included help output:
$ http --help- Enable Travis CI cronjob on this repo to run build daily on master branch
- Check if there are new tags/releases announced via Github REST API
- Match the exist docker image tags via Hub.docker.io REST API
- If not matched, build the image with latest version as tag and push to hub.docker.com