FROM alpine:latest as build RUN apk add --no-cache git WORKDIR /src RUN git clone --depth=1 --recurse-submodules https://github.com/glennhartmann/quakejs FROM alpine:latest RUN apk add --no-cache lighttpd RUN chown -R lighttpd /var/log/lighttpd COPY lighttpd.conf /etc/lighttpd/lighttpd.conf COPY --from=build /src/quakejs/html/ /srv/http/ RUN chown -R lighttpd /srv COPY index.html.template /bootstrap/index.html.template RUN chown -R lighttpd /bootstrap COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh USER lighttpd EXPOSE 8080 ENTRYPOINT ["/entrypoint.sh"] CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]