mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove unnecessary getLayerInit
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
68c3201626
commit
c502bcff33
4 changed files with 7 additions and 11 deletions
|
@ -266,7 +266,7 @@ func (daemon *Daemon) setRWLayer(container *container.Container) error {
|
|||
|
||||
rwLayerOpts := &layer.CreateRWLayerOpts{
|
||||
MountLabel: container.MountLabel,
|
||||
InitFunc: daemon.getLayerInit(),
|
||||
InitFunc: setupInitLayer(daemon.idMappings),
|
||||
StorageOpt: container.HostConfig.StorageOpt,
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
// register graph drivers
|
||||
_ "github.com/docker/docker/daemon/graphdriver/register"
|
||||
"github.com/docker/docker/daemon/initlayer"
|
||||
"github.com/docker/docker/daemon/stats"
|
||||
dmetadata "github.com/docker/docker/distribution/metadata"
|
||||
"github.com/docker/docker/distribution/xfer"
|
||||
|
@ -41,7 +40,6 @@ import (
|
|||
"github.com/docker/docker/layer"
|
||||
"github.com/docker/docker/libcontainerd"
|
||||
"github.com/docker/docker/migrate/v1"
|
||||
"github.com/docker/docker/pkg/containerfs"
|
||||
"github.com/docker/docker/pkg/idtools"
|
||||
"github.com/docker/docker/pkg/locker"
|
||||
"github.com/docker/docker/pkg/plugingetter"
|
||||
|
@ -1142,11 +1140,6 @@ func prepareTempDir(rootDir string, rootIDs idtools.IDPair) (string, error) {
|
|||
return tmpDir, idtools.MkdirAllAndChown(tmpDir, 0700, rootIDs)
|
||||
}
|
||||
|
||||
func (daemon *Daemon) setupInitLayer(initPath containerfs.ContainerFS) error {
|
||||
rootIDs := daemon.idMappings.RootPair()
|
||||
return initlayer.Setup(initPath, rootIDs)
|
||||
}
|
||||
|
||||
func (daemon *Daemon) setGenericResources(conf *config.Config) error {
|
||||
genericResources, err := config.ParseGenericResources(conf.NodeGenericResources)
|
||||
if err != nil {
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
containertypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/container"
|
||||
"github.com/docker/docker/daemon/config"
|
||||
"github.com/docker/docker/daemon/initlayer"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/opts"
|
||||
"github.com/docker/docker/pkg/containerfs"
|
||||
|
@ -1000,8 +1001,10 @@ func removeDefaultBridgeInterface() {
|
|||
}
|
||||
}
|
||||
|
||||
func (daemon *Daemon) getLayerInit() func(containerfs.ContainerFS) error {
|
||||
return daemon.setupInitLayer
|
||||
func setupInitLayer(idMappings *idtools.IDMappings) func(containerfs.ContainerFS) error {
|
||||
return func(initPath containerfs.ContainerFS) error {
|
||||
return initlayer.Setup(initPath, idMappings.RootPair())
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the remapped root (user namespace) option, which can be one of:
|
||||
|
|
|
@ -54,7 +54,7 @@ func parseSecurityOpt(container *container.Container, config *containertypes.Hos
|
|||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) getLayerInit() func(containerfs.ContainerFS) error {
|
||||
func setupInitLayer(idMappings *idtools.IDMappings) func(containerfs.ContainerFS) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue