summaryrefslogtreecommitdiffstats
path: root/documentation/tools/Containerfile.apt
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2025-01-27 19:37:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-18 15:47:37 +0000
commit7ea05616697eaa20341fac0fab2fda28ddf7c18e (patch)
tree2d12d1b37db7c90d904aa6b7c1a4e16abff21c4f /documentation/tools/Containerfile.apt
parent9d7930a4e0d0566e41ad0e0cf551cab04e847d64 (diff)
downloadpoky-7ea05616697eaa20341fac0fab2fda28ddf7c18e.tar.gz
tools: add script for building documentation inside containers
This adds a script for building a container and building the documentation within that new container image. The openSUSE instructions now require a --non-interactive flag otherwise they fail to run. Sadly there doesn't seem to be a way to have this in an environment variable à-la DEBIAN_FRONTEND=noninteractive, so we simply do a sed on the scripts to add --non-interactive to the zypper commands to avoid having those in the instructions provided to our users. Somehow tzdata package in Ubuntu doesn't respect DEBIAN_FRONTEND=noninteractive hence why the timezone needs to be set by hand. (From yocto-docs rev: cefced592f1302fcb65afa9e0b1f9f5ff1570e93) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Antonin Godard <antonin.godard@bootlin.com> Tested-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/tools/Containerfile.apt')
-rw-r--r--documentation/tools/Containerfile.apt26
1 files changed, 26 insertions, 0 deletions
diff --git a/documentation/tools/Containerfile.apt b/documentation/tools/Containerfile.apt
new file mode 100644
index 0000000000..5e30b65eb8
--- /dev/null
+++ b/documentation/tools/Containerfile.apt
@@ -0,0 +1,26 @@
1ARG ARG_FROM=debian:12 # default value to avoid warning
2FROM $ARG_FROM
3
4ARG DOCS=ubuntu_docs.sh
5ARG DOCS_PDF=ubuntu_docs_pdf.sh
6
7ENV DEBIAN_FRONTEND=noninteractive
8ARG TZ=Europe/Vienna
9
10# relative to the location of the dockerfile
11COPY --chmod=777 ${DOCS} /temp/host_packages_docs.sh
12COPY --chmod=777 ${DOCS_PDF} /temp/host_packages_docs_pdf.sh
13
14RUN ln -fs "/usr/share/zoneinfo/$TZ" /etc/localtime \
15 && apt-get update \
16 && apt-get install -y sudo \
17 && yes | /temp/host_packages_docs.sh \
18 && yes | /temp/host_packages_docs_pdf.sh \
19 && apt-get --yes autoremove \
20 && apt-get clean \
21 && rm -rf /temp
22
23RUN git config --global --add safe.directory /docs
24
25ENTRYPOINT ["/usr/bin/env", "make", "-C", "documentation/"]
26CMD ["publish"]