stagit (965B)
1 FROM nginx:alpine 2 RUN apk --no-cache add -X https://dl-cdn.alpinelinux.org/alpine/edge/testing stagit 3 EXPOSE 80 4 ENTRYPOINT dirs="" && \ 5 for dir in /git/*/; do \ 6 r=$(basename "${dir}"); \ 7 d=$(basename "${dir}" ".git"); \ 8 if ! test -f "/git/${r}/stagit-export-ok"; then \ 9 continue; \ 10 else \ 11 dirs="${dirs}${dir} "; \ 12 fi; \ 13 echo "${d}"; \ 14 mkdir -p "/usr/share/nginx/html/${d}"; \ 15 cd "/usr/share/nginx/html/${d}" || continue; \ 16 stagit -u "${GIT_BASE_URL}/$d/" "/git/${r}"; \ 17 ln -sf log.html index.html; \ 18 ln -sf ../style.css style.css; \ 19 ln -sf ../logo.png logo.png; \ 20 ln -sf ../favicon.png favicon.png; \ 21 done && stagit-index ${dirs} > /usr/share/nginx/html/index.html && \ 22 /docker-entrypoint.sh nginx -g 'daemon off;'