FROM alpine:3.14

EXPOSE 80

RUN apk add --no-cache fcgiwrap git git-daemon nginx openssl spawn-fcgi

# launch fcgiwrap via spawn-fcgi and run nginx in the foreground
CMD spawn-fcgi -s /run/fcgi.sock -U nginx /usr/bin/fcgiwrap && \
    nginx -g "daemon off;"
