Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 781 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 781 Bytes

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