poky/documentation/tools/Containerfile.dnf
Antonin Godard 7b7aa8c4cc tools/build-docs-container: add option to install essential packages
The script currently only installs the files necessary to build the
docs. Since we also have the essential packages listed it can be useful
to include them in the containers, at least to validate that these
successfully install.

Add an env variable for including these packages in the container. The
default is to not include these, so the current behavior is unchanged.

(From yocto-docs rev: 723e531ea442df96fd592635a2fbfba73e737886)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-10-14 11:36:58 +01:00

30 lines
937 B
Plaintext

ARG ARG_FROM=fedora:40 # default value to avoid warning
FROM $ARG_FROM
ARG INCLUDE_ESSENTIAL_PACKAGES=0
ARG ESSENTIAL=fedora_essential.sh
ARG DOCS=fedora_docs.sh
ARG DOCS_PDF=fedora_docs_pdf.sh
ARG PIP3=pip3_docs.sh
# relative to the location of the dockerfile
COPY --chmod=777 ${ESSENTIAL} /temp/host_packages_essential.sh
COPY --chmod=777 ${DOCS} /temp/host_packages_docs.sh
COPY --chmod=777 ${DOCS_PDF} /temp/host_packages_docs_pdf.sh
COPY --chmod=777 ${PIP3} /temp/pip3_docs.sh
RUN dnf update -y \
&& dnf install -y sudo \
&& if [ "$INCLUDE_ESSENTIAL_PACKAGES" = "1" ]; then yes | /temp/host_packages_essential.sh; fi \
&& yes | /temp/host_packages_docs.sh \
&& yes | /temp/host_packages_docs_pdf.sh \
&& yes | /temp/pip3_docs.sh \
&& dnf autoremove -y \
&& dnf clean all -y \
&& rm -rf /temp
RUN git config --global --add safe.directory /docs
ENTRYPOINT ["/usr/bin/env", "make", "-C", "documentation/"]
CMD ["publish"]