Sign inSign up

tozlu/http-server

By tozlu

•Updated almost 5 years ago

Serve any local directory over http/https without any dependencies.

Image
0

761

tozlu/http-server repository overview

⁠Http-Server-Docker

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

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

⁠Options

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.

⁠Source Repository

https://github.com/mtozlu/http-server-docker⁠

Tag summary

Content type

Image

Digest

Size

41.1 MB

Last updated

almost 5 years ago

docker pull tozlu/http-server