View on GitHub

docker-lighttpd

lighttpd web server with default config optimized for high traffic frontend website

lighttpd Docker Image

Base Image

Useful Info

Paths

Feel free to replace or modify these config files if required!

Default Config (lighttpd.conf)

Examples

Dockerize React App (Multi-Stage Build)

FROM node:14 AS builder

COPY package.json \
     package-lock.json \
     /usr/web/

WORKDIR /usr/web/
RUN npm ci

COPY public/ /usr/web/public/
COPY src/ /usr/web/src/
RUN npm run build

FROM rtsp/lighttpd
COPY --from=builder /usr/web/build/ /var/www/html/

Directly use as Web Server (Volume mount)

docker run -d \
  --name your-webapp \
  -v /webapp/dir:/var/www/html:ro \
  -p 8080:80 \
  rtsp/lighttpd