Serve any local directory over http/https without any dependencies.
761
Serve any local directory over http/https using docker without any dependencies.
Uses http-server (https://www.npmjs.com/package/http-server) inside container.
Running this command in any directory serves its contents:
docker run -d -p 8080:8080 -v "$(PWD):/public" tozlu/http-server
Visit: http://127.0.0.1:8080 or http://localhost:8080
You can use available options on https://github.com/http-party/http-server#available-options as the last argument of docker run command.
docker run -d -p 8080:8080 -v "$(PWD):/public" tozlu/http-server "-c-1"
-c-1 command at the end is passed to http-server options. It disables caching of served files.
There many more options such as enabling https, using brotli compression, etc.
Content type
Image
Digest
Size
41.1 MB
Last updated
almost 5 years ago
docker pull tozlu/http-server