Skip to content

Commit

Permalink
run: honor lockfiles for multiple --mount instruction
Browse files Browse the repository at this point in the history
Single `RUN` can contain multiple `--mount` commands so lets append into
`lockedTargets` so we collect `lockfiles` from all the `--mount`
instructions.

Helps in: containers#4342

Signed-off-by: Aditya R <arajan@redhat.com>
  • Loading branch information
flouthoc committed Oct 19, 2022
1 parent f2e0af5 commit 6838cbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ func (b *Builder) runSetupRunMounts(mounts []string, sources runMountInfo, idMap
}
finalMounts = append(finalMounts, *mount)
mountTargets = append(mountTargets, mount.Destination)
lockedTargets = lockedPaths
lockedTargets = append(lockedTargets, lockedPaths...)
default:
return nil, nil, fmt.Errorf("invalid mount type %q", mountType)
}
Expand Down

0 comments on commit 6838cbc

Please sign in to comment.