Skip to content

KSonny4/simple-docker-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Docker HTTP server

GitHub CI Docker Stars Docker Pulls Docker Image Size Docker Image Version

Yet another simple dockerized http web for testing purposes that responds to all GET requests. I don't want to run someone else's HTTP server when I can quickly create my own and be sure what am I running. There are easier ways to create HTTP server, but I am most familiar with aiohttp.

This is container uses python, poetry, aiohttp and docker to create web server listening to GET requests on port of your choice.

examples

Run docker container on local port 1234

docker run -d -p 1234:8080 ksonny4/simple-docker-http-server
curl 'http://127.0.0.1:1234/'
curl 'http://localhost:1234/'

Use port 8888 in container and local port 8080

 docker run -d -p 8080:8888 -e PORT=8888 ksonny4/simple-docker-http-server
 curl 'http://127.0.0.1:8080/'

Change host in docker

docker run -d -p 8080:8888 -e HOST=0.0.0.0 -e PORT=8888 ksonny4/simple-docker-http-server
curl 'http://127.0.0.1:8080/'

About

simple-http-web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published