-
Story
-
Resolution: Unresolved
-
Minor
-
None
-
DO188 - RHOCP4.18-en-1-20250430
-
False
-
-
False
-
4
-
-
-
en-US (English)
Please fill in the following information:
URL: | https://role.rhu.redhat.com/rol-rhu/app/courses/do188-4.18/pages/ch04s04 |
Reporter RHNID: | acancell@redhat.com |
Section Title: | Guided Exercise: Build Images with Advanced Containerfile Instructions |
Issue description:
WORKDIR is instead preserved between “nested” builds:
~~~
#Containerfile.a
FROM registry.access.redhat.com/ubi9/ubi:9.5
WORKDIR /opt
$ podman build -f Containerfile.a -t test:1
#Containerfile.b
FROM localhost/test:1
CMD ["pwd"]
$ podman build -f Containerfile.b -t test:2
$ podman run test:2
/opt ← OUTPUT
~~~
Without this clarification, step 2.3 (where we COPY --from) doesn't make sense, since the reader can't figure out why the source is "/app/numbers.txt" and not "/numbers.txt"
Steps to reproduce:
Workaround:
Expected result: