Containerfile.zypper 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. ARG ARG_FROM=opensuse/leap:15.4 # default value to avoid warning
  2. FROM $ARG_FROM
  3. ARG DOCS=opensuse_docs.sh
  4. ARG DOCS_PDF=opensuse_docs_pdf.sh
  5. ARG PIP3=pip3_docs.sh
  6. # relative to the location of the dockerfile
  7. COPY --chmod=777 ${DOCS} /temp/host_packages_docs.sh
  8. COPY --chmod=777 ${DOCS_PDF} /temp/host_packages_docs_pdf.sh
  9. COPY --chmod=777 ${PIP3} /temp/pip3_docs.sh
  10. # Zypper doesn't have environment variables to specify whether to run in
  11. # non-interactive mode like Debian does with DEBIAN_FRONTEND and piping yes to
  12. # the scripts doesn't need to be enough as well, so let's force all zypper calls
  13. # to be non-interactive by adding the appropriate flag in the scripts.
  14. RUN for script in /temp/*.sh; do \
  15. sed -i 's/zypper/zypper --non-interactive/' $script; \
  16. done
  17. RUN zypper update -y \
  18. && zypper install -y sudo \
  19. && yes | /temp/host_packages_docs.sh \
  20. && yes | /temp/host_packages_docs_pdf.sh \
  21. && yes | /temp/pip3_docs.sh \
  22. && zypper clean --all \
  23. && rm -rf /temp
  24. RUN git config --global --add safe.directory /docs
  25. ENTRYPOINT ["/usr/bin/env", "make", "-C", "documentation/"]
  26. CMD ["publish"]