Skip to content

Commit 8253cc1

Browse files
authored
Merge pull request #284 from rhatdan/docker-1.12.6
/dev should not be readonly with --readonly flag
2 parents 6f58874 + 66836d8 commit 8253cc1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

daemon/oci_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func setMounts(daemon *Daemon, s *specs.Spec, c *container.Container, mounts []c
541541
if s.Root.Readonly {
542542
for i, m := range s.Mounts {
543543
switch m.Destination {
544-
case "/proc", "/dev/pts", "/dev/mqueue": // /dev is remounted by runc
544+
case "/proc", "/dev/pts", "/dev/mqueue", "/dev":
545545
continue
546546
}
547547
if _, ok := userMounts[m.Destination]; !ok {

integration-cli/docker_cli_run_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2874,7 +2874,7 @@ func (s *DockerSuite) TestRunContainerWithReadonlyRootfs(c *check.C) {
28742874
// Not applicable on Windows which does not support --read-only
28752875
testRequires(c, DaemonIsLinux)
28762876

2877-
testReadOnlyFile(c, "/file", "/etc/hosts", "/etc/resolv.conf", "/etc/hostname", "/sys/kernel", "/dev/.dont.touch.me")
2877+
testReadOnlyFile(c, "/file", "/etc/hosts", "/etc/resolv.conf", "/etc/hostname", "/sys/kernel")
28782878
}
28792879

28802880
func (s *DockerSuite) TestPermissionsPtsReadonlyRootfs(c *check.C) {

0 commit comments

Comments
 (0)