diff --git a/daemon/cluster/executor/container/adapter.go b/daemon/cluster/executor/container/adapter.go index b9b42d02e5..34845abbd1 100644 --- a/daemon/cluster/executor/container/adapter.go +++ b/daemon/cluster/executor/container/adapter.go @@ -431,6 +431,7 @@ func (c *containerAdapter) remove(ctx context.Context) error { func (c *containerAdapter) createVolumes(ctx context.Context) error { // Create plugin volumes that are embedded inside a Mount for _, mount := range c.container.task.Spec.GetContainer().Mounts { + mount := mount if mount.Type != api.MountTypeVolume { continue } diff --git a/daemon/network.go b/daemon/network.go index bfae1365dd..38e6b44a43 100644 --- a/daemon/network.go +++ b/daemon/network.go @@ -573,9 +573,9 @@ func (daemon *Daemon) GetNetworks(filter filters.Args, config types.NetworkListC } if config.Detailed { - for i, n := range list { - np := &n - buildDetailedNetworkResources(np, idx[n.ID], config.Verbose) + for i := range list { + np := &list[i] + buildDetailedNetworkResources(np, idx[np.ID], config.Verbose) list[i] = *np } }