The httpbin.org is a web service that accepts HTTP requests and returns response. It is useful for testing HTTP clients using various HTTP methods, status codes, response formats, and more. The httpbin is an open-source project which can be installed on own server.
This tutorial explains how to install httpbin inside a Docker container in Linux. Commands have been tested on Ubuntu 20.04 LTS.
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
Run the following command to create container for httpbin:
docker run -d --name=httpbin --restart=always --network=host kennethreitz/httpbin
By default, httpbin service is listening on port 80. It can be changed with
docker run -d --name=httpbin --restart=always -p 8080:80 kennethreitz/httpbin
Open a web browser and go to
<IP_ADDRESS> is IP address of the system.
If you wish to completely uninstall httpbin, remove it's container:
docker rm --force httpbin
Remove httpbin image:
docker rmi kennethreitz/httpbin