1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #36991 from kolyshkin/slice-in-place

daemon.setMounts(): copy slice in place
This commit is contained in:
Sebastiaan van Stijn 2018-05-14 13:49:47 +02:00 committed by GitHub
commit 31aca4bef4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -527,7 +527,7 @@ func setMounts(daemon *Daemon, s *specs.Spec, c *container.Container, mounts []c
// - /dev/shm, in case IpcMode is none. // - /dev/shm, in case IpcMode is none.
// While at it, also // While at it, also
// - set size for /dev/shm from shmsize. // - set size for /dev/shm from shmsize.
var defaultMounts []specs.Mount defaultMounts := s.Mounts[:0]
_, mountDev := userMounts["/dev"] _, mountDev := userMounts["/dev"]
for _, m := range s.Mounts { for _, m := range s.Mounts {
if _, ok := userMounts[m.Destination]; ok { if _, ok := userMounts[m.Destination]; ok {