Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. FROM python:3.8-alpine3.12 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 export-tar mount umount restore list info borg; do \
  6. echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
  7. && borgmatic "$action" --help >> /command-line.txt; done
  8. FROM node:15.2.1-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. @11ty/eleventy-navigation \
  15. markdown-it \
  16. markdown-it-anchor \
  17. markdown-it-replace-link
  18. COPY --from=borgmatic /etc/borgmatic/config.yaml /source/docs/_includes/borgmatic/config.yaml
  19. COPY --from=borgmatic /command-line.txt /source/docs/_includes/borgmatic/command-line.txt
  20. COPY . /source
  21. RUN NODE_ENV=${ENVIRONMENT} npx eleventy --input=/source/docs --output=/output/docs \
  22. && mv /output/docs/index.html /output/index.html
  23. FROM nginx:1.19.4-alpine
  24. COPY --from=html /output /usr/share/nginx/html
  25. COPY --from=borgmatic /etc/borgmatic/config.yaml /usr/share/nginx/html/docs/reference/config.yaml