Sign inSign up

andrejkosyak/docker-serve-dir

By andrejkosyak

•Updated about 10 years ago

Serve static files with NodeJS server

Image
0

444

andrejkosyak/docker-serve-dir repository overview

License MIT Analytics

This image allows you to serve static files. It's a NodeJS server application, that uses express⁠, serve-index⁠ and serve-static⁠ libraries to allow user-friendly file listing. If a file is being clicked - download is forced.

⁠Usage

Example:

docker run -d \
    --name serve-dir-index \
    -p 30000:3000 \
    -v "/home/files-to-serve/:/home/serve-dir-index/" \
    -e "servePath=/home/serve-dir-index/" \
    andrejkosyak/docker-serve-dir:latest

⁠Config

Environment (required) An -e variable should be passed for servePath. This would be the index folder.

Volume (optional) You can map a volume or just serve from the container filesystem.

Tag summary

Content type

Image

Digest

Size

245.5 MB

Last updated

about 10 years ago

docker pull andrejkosyak/docker-serve-dir