1
0
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:
Antonio Murdaca
2016-06-06 11:57:11 +02:00
parent 73169da9db
commit 756f6cef4a
5 changed files with 32 additions and 4 deletions

View File

@@ -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)