Fix a bug in volume handling for multi-stage images. (#554)

We were previously not resetting the whitelist between stages, this caused issues with volumes.
This commit is contained in:
dlorenc
2019-02-07 09:01:49 -06:00
committed by GitHub
parent 82fe355f14
commit e14b660947
3 changed files with 10 additions and 2 deletions
@@ -0,0 +1,5 @@
FROM scratch as one
VOLUME /vol
FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a as two
RUN mkdir /vol && echo hey > /vol/foo
+1 -1
View File
@@ -218,7 +218,7 @@ func TestRun(t *testing.T) {
// container-diff
daemonDockerImage := daemonPrefix + dockerImage
containerdiffCmd := exec.Command("container-diff", "diff",
containerdiffCmd := exec.Command("container-diff", "diff", "--no-cache",
daemonDockerImage, kanikoImage,
"-q", "--type=file", "--type=metadata", "--json")
diff := RunCommand(containerdiffCmd, t)