Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. FROM python:3.7.4-alpine3.10 as borgmatic
  2. COPY . /app
  3. RUN pip install --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml
  4. RUN borgmatic --help > /command-line.txt \
  5. && for action in init prune create check extract restore list info; do \
  6. echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
  7. && borgmatic "$action" --help >> /command-line.txt; done
  8. FROM node:12.10.0-alpine as html
  9. ARG ENVIRONMENT=production
  10. WORKDIR /source
  11. RUN npm install @11ty/eleventy \
  12. @11ty/eleventy-plugin-syntaxhighlight \
  13. @11ty/eleventy-plugin-inclusive-language \
  14. markdown-it \
  15. markdown-it-anchor \
  16. markdown-it-replace-link
  17. COPY --from=borgmatic /etc/borgmatic/config.yaml /source/docs/_includes/borgmatic/config.yaml
  18. COPY --from=borgmatic /command-line.txt /source/docs/_includes/borgmatic/command-line.txt
  19. COPY . /source
  20. RUN NODE_ENV=${ENVIRONMENT} npx eleventy --input=/source/docs --output=/output/docs \
  21. && mv /output/docs/index.html /output/index.html
  22. FROM nginx:1.16.1-alpine
  23. COPY --from=html /output /usr/share/nginx/html
  24. COPY --from=borgmatic /etc/borgmatic/config.yaml /usr/share/nginx/html/docs/reference/config.yaml