Home
Softono

Docker Helloworld Http

Open source Shell
36
Stars
30
Forks
1
Issues
1
Watchers
6 years
Last Commit

 About Docker Helloworld Http

Docker image to test HTTP load balancers

Platforms

Web Self-hosted Docker

Languages

Shell

Need Help Installing Docker Helloworld Http?

We provide expert installation service for this software. Our team will install, configure, and secure Docker Helloworld Http on your server. plans start at just $30.

Alternatives to Docker Helloworld Http

View All

Docker Helloworld Http

View on GitHub

Simple http 'hello world' for load balancer testing

Docker Pulls

This image is a simple 'Hello world' in an HTTP server to be used to test load balancers. When receive an request (GET /) this image will return the current machine hostname.

It shows Hello from <hostname> for every request, making it easier to determine what host received the request.

Running a simple test

docker run --rm -it -p 80:80 strm/helloworld-http

Will result in a single instance running on your port 80, you can test and will get a result like it:

Print

Implementing a load balancer

Now what this image is made for, test load balancers, create the following docker-compose.yml

version: '2'
services:
    front:
        image: strm/nginx-balancer
        container_name: load-balancer
        ports:
            - "80:8080"
        environment:
            - "NODES=web1:80 web2:80"
    web1:
        image: strm/helloworld-http
    web2:
        image: strm/helloworld-http

To run the image use the command:

docker-compose up

And you will see in the result that the balancer is working and balancing the request through images web1 and web2