Add a conformance test for copying to a mounted prior stage
Add a conformance test for cases where an intermediate stage mounts the contents of a previous stage in a read-write fashion and modifies it. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
0e0676d854
commit
a2f0ebef65
|
@ -3081,6 +3081,12 @@ var internalTestCases = []testCase{
|
||||||
contextDir: "env/precedence",
|
contextDir: "env/precedence",
|
||||||
dockerUseBuildKit: true,
|
dockerUseBuildKit: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "multistage-copyback",
|
||||||
|
contextDir: "multistage/copyback",
|
||||||
|
dockerUseBuildKit: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCommit(t *testing.T) {
|
func TestCommit(t *testing.T) {
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM alpine AS base
|
||||||
|
RUN touch -r /etc/os-release /1.txt
|
||||||
|
FROM alpine AS interloper
|
||||||
|
RUN --mount=type=bind,from=base,source=/,destination=/base,rw touch -r /etc/os-release /base/2.txt
|
||||||
|
FROM base
|
||||||
|
RUN --mount=type=bind,from=interloper,source=/etc,destination=/etc2 touch -r /etc2/os-release /3.txt
|
Loading…
Reference in New Issue