imfreedom/docs.imfreedom.org

Add support for pulling docs out of zip files
default tip
10 months ago, Gary Kramlich
57cd6963bcbd
Add support for pulling docs out of zip files

Testing Done:
Dropped `hasl.zip` in the `archives/` directory and verified it showed up in the final container. The hasl docs are going to be in another review request.

Also built with the `archives/` directory empty and verified it ran without issue.

Reviewed at https://reviews.imfreedom.org/r/2456/
FROM docker.io/nginx:alpine AS extractor
COPY archives/ /archives/
# alpine xargs doesn't have long flags, -r is don't run if input is empty, and
# n is max args.
RUN mkdir /docs && \
ls /archives/*.zip | xargs -r -n 1 unzip -d /docs
FROM docker.io/nginx:alpine
COPY static/ /usr/share/nginx/html/
COPY docs/ /usr/share/nginx/html/
COPY --from=extractor /docs/ /usr/share/nginx/html/