Skip to content

carlsa/lite-server-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

What it is

This docker file allow you run lite-server in a docker container so you don't have to install nodejs on your system.

Construct the image

In the git repository, run docker build -t "liteserver:Dockerfile" .

Start a container

In the directory that you want to serve, run

docker run -p 127.0.0.1:3000:3000 --init --rm -v "$PWD":/src liteserver:Dockerfile

-rm removes the container once it exits

--init makes lite-server run as something else than PID 1, without it you won't be able to exit with ctrl-c since PID 1 doesn't accep SIGTERM. See this.

The " around $PWD are reqired if your path contains spaces

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published