Skip to content

andrekosak/docker-serve-dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Serve a directory with static files with a docker container

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published