@@ -9,9 +9,13 @@ FROM $ARG_FROM
# container, and it must match the pwd when pip3_docs.sh is run in a later
# layer. This *must* be outside of any mount point otherwise it won't be
# available within the container.
-ENV VIRTUAL_ENV=$PWD/yocto-docs-venv
+ENV VIRTUAL_ENV=/yocto-docs-venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
+# Set the WORKDIR to / so the pip3_docs.sh script will find our virtual env
+# when calling '. ./yocto-docs-venv/bin/activate'.
+WORKDIR /
+
ARG INCLUDE_ESSENTIAL_PACKAGES=0
ARG ESSENTIAL=ubuntu_essential.sh
ARG DOCS=ubuntu_docs.sh
@@ -9,9 +9,13 @@ FROM $ARG_FROM
# container, and it must match the pwd when pip3_docs.sh is run in a later
# layer. This *must* be outside of any mount point otherwise it won't be
# available within the container.
-ENV VIRTUAL_ENV=$PWD/yocto-docs-venv
+ENV VIRTUAL_ENV=/yocto-docs-venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
+# Set the WORKDIR to / so the pip3_docs.sh script will find our virtual env
+# when calling '. ./yocto-docs-venv/bin/activate'.
+WORKDIR /
+
ARG INCLUDE_ESSENTIAL_PACKAGES=0
ARG ESSENTIAL=fedora_essential.sh
ARG DOCS=fedora_docs.sh
@@ -9,9 +9,13 @@ FROM $ARG_FROM
# container, and it must match the pwd when pip3_docs.sh is run in a later
# layer. This *must* be outside of any mount point otherwise it won't be
# available within the container.
-ENV VIRTUAL_ENV=$PWD/yocto-docs-venv
+ENV VIRTUAL_ENV=/yocto-docs-venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
+# Set the WORKDIR to / so the pip3_docs.sh script will find our virtual env
+# when calling '. ./yocto-docs-venv/bin/activate'.
+WORKDIR /
+
ARG INCLUDE_ESSENTIAL_PACKAGES=0
ARG ESSENTIAL=opensuse_essential.sh
ARG DOCS=opensuse_docs.sh
The current Containerfiles produce the following warning with docker: 1 warning found (use docker --debug to expand): - UndefinedVar: Usage of undefined variable '$PWD' (line 12) Remove $PWD and set the WORKDIR so that our pip3_docs.sh script finds the virtual env. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/tools/containerfiles/Containerfile.apt | 6 +++++- documentation/tools/containerfiles/Containerfile.dnf | 6 +++++- documentation/tools/containerfiles/Containerfile.zypper | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) --- base-commit: ba351b35480d9c06c870a6f34d8bdbc1856b9511 change-id: 20260227-fix-docker-build-warning-812177bd3302