mirror of
https://github.com/moby/moby.git
synced 2025-12-09 10:01:25 +03:00
daemon: allow tmpfs to trump over VOLUME(s)
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
@@ -829,6 +829,23 @@ func (s *DockerSuite) TestRunTmpfsMounts(c *check.C) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunTmpfsMountsOverrideImageVolumes(c *check.C) {
|
||||
name := "img-with-volumes"
|
||||
_, err := buildImage(
|
||||
name,
|
||||
`
|
||||
FROM busybox
|
||||
VOLUME /run
|
||||
RUN touch /run/stuff
|
||||
`,
|
||||
true)
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
out, _ := dockerCmd(c, "run", "--tmpfs", "/run", name, "ls", "/run")
|
||||
c.Assert(out, checker.Not(checker.Contains), "stuff")
|
||||
}
|
||||
|
||||
// Test case for #22420
|
||||
func (s *DockerSuite) TestRunTmpfsMountsWithOptions(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
||||
Reference in New Issue
Block a user