https://github.com/trinitronx/docker-python-simplehttpserver
https://github.com/trinitronx/docker-python-simplehttpserver
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/trinitronx/docker-python-simplehttpserver
- Owner: trinitronx
- License: gpl-3.0
- Created: 2015-11-29T11:57:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T19:15:50.000Z (over 1 year ago)
- Last Synced: 2025-04-05T14:01:51.965Z (about 1 year ago)
- Language: Ruby
- Size: 31.3 KB
- Stars: 10
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Docker Python SimpleHTTPServer
==============================
[](https://travis-ci.org/trinitronx/docker-python-simplehttpserver)
[](https://hub.docker.com/r/trinitronx/python-simplehttpserver)
[](https://hub.docker.com/r/trinitronx/python-simplehttpserver)
[](https://en.liberapay.com/trinitronx)
[](https://liberapay.com/trinitronx/donate)
A Simple & Compact (< ~8.5 MB) Python webserver in a Docker Container.
By default, listens on port `8080`
To serve files, volume mount a directory to `/var/www` inside the container.
Example Usage
-------------
To listen on port `8080` and serve files from directory `/tmp/` on the host:
sudo docker run -d -v /tmp/:/var/www:ro -p 8080:8080 trinitronx/python-simplehttpserver
To listen on port `80` and serve files from directory `/home/foo` on the host:
sudo docker run --name python_simplehttpserver -d -v /home/foo:/var/www:ro -p 80:8080 trinitronx/python-simplehttpserver
To run server so it is only accessible to linked containers:
sudo docker run --name python_simplehttpserver -d -v /tmp/:/var/www:ro -p 8080:8080 trinitronx/python-simplehttpserver
# Then run your container & link it...
sudo docker run -ti --link python_simplehttpserver busybox wget -O - http://python_simplehttpserver:8080/
# Another example:
# Use with trinitronx/fastest-servers as a MIRRORLIST_HOST for serving up mirrors.txt file for fastest-servers.rb to filter down to fastest found
sudo docker run -ti --link python_simplehttpserver -e FASTEST_SERVER_DEBUG=true -e MIRRORLIST_HOST=python_simplehttpserver -e MIRRORLIST_PORT=8080 -v /tmp/:/tmp/ trinitronx/fastest-servers
Sponsor
-------
If you find this project useful and appreciate my work,
would you be willing to click one of the buttons below to Sponsor this project and help me continue?
- :heart: Sponsor
-
- 
Every little bit is appreciated! Thank you! 🙏
License
-------
This project is licensed under the [GNU GPLv3][1]. See `LICENSE` file for full text.
[1]: https://choosealicense.com/licenses/gpl-3.0/#