Skip to content

teapow/http-echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-echo

A simple, HTTP server (written with Flask) that returns a response based on the value of the ECHO_MESSAGE environment variable.

Pre-built image

A pre-built image is available for use on Docker Hub.

teapow/http-echo

Building the image

To build the image, run the following command from the root of this repository:

docker build . --tag=http-echo:latest

Running the image

After building the image, it can be run locally with:

docker run --rm --publish 8080:8080 --env ECHO_MESSAGE="Hello, world!" http-echo:latest 

You should be able to access the application by visiting http://localhost:8080/ in your browser.

Supported environment variables

The behaviour of the application can be modified via the following environment variables:

Name Default value Description
ECHO_MESSAGE "This is the default message." Controls the message returned in the HTTP response.
SERVER_HOST "0.0.0.0" The hostname to listen on.
SERVER_PORT 8080 The port of the webserver.
SERVER_DEBUG False Controls whether the webserver runs in debug mode.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages