Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829
  1. FROM python:3.7.3-alpine3.9 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 list info; do \
  6. echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
  7. && borgmatic "$action" --help >> /command-line.txt; done
  8. FROM node:11.15.0-alpine as html
  9. WORKDIR /source
  10. RUN npm install @11ty/eleventy \
  11. @11ty/eleventy-plugin-syntaxhighlight \
  12. @11ty/eleventy-plugin-inclusive-language \
  13. markdown-it \
  14. markdown-it-anchor \
  15. markdown-it-replace-link
  16. COPY --from=borgmatic /etc/borgmatic/config.yaml /source/docs/_includes/borgmatic/config.yaml
  17. COPY --from=borgmatic /command-line.txt /source/docs/_includes/borgmatic/command-line.txt
  18. COPY . /source
  19. RUN npx eleventy --input=/source/docs --output=/output/docs \
  20. && mv /output/docs/index.html /output/index.html
  21. FROM nginx:1.16.0-alpine
  22. COPY --from=html /output /usr/share/nginx/html
  23. COPY --from=borgmatic /etc/borgmatic/config.yaml /usr/share/nginx/html/docs/reference/config.yaml