mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Merge pull request #17405 from LK4D4/cont_pointer
Return pointer from newBaseContainer Upstream-commit: 82f70677b99e7d30c63d40658b36b0c5373cadba Component: engine
This commit is contained in:
@@ -177,10 +177,10 @@ func (daemon *Daemon) load(id string) (*Container, error) {
|
||||
}
|
||||
|
||||
if container.ID != id {
|
||||
return &container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
|
||||
return container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
|
||||
}
|
||||
|
||||
return &container, nil
|
||||
return container, nil
|
||||
}
|
||||
|
||||
// Register makes a container object usable by the daemon as <container.ID>
|
||||
@@ -484,7 +484,7 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, imgID
|
||||
base.Driver = daemon.driver.String()
|
||||
base.ExecDriver = daemon.execDriver.Name()
|
||||
|
||||
return &base, err
|
||||
return base, err
|
||||
}
|
||||
|
||||
// GetFullContainerName returns a constructed container name. I think
|
||||
|
||||
@@ -599,8 +599,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) newBaseContainer(id string) Container {
|
||||
return Container{
|
||||
func (daemon *Daemon) newBaseContainer(id string) *Container {
|
||||
return &Container{
|
||||
CommonContainer: CommonContainer{
|
||||
ID: id,
|
||||
State: NewState(),
|
||||
|
||||
@@ -140,8 +140,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) newBaseContainer(id string) Container {
|
||||
return Container{
|
||||
func (daemon *Daemon) newBaseContainer(id string) *Container {
|
||||
return &Container{
|
||||
CommonContainer: CommonContainer{
|
||||
ID: id,
|
||||
State: NewState(),
|
||||
|
||||
Reference in New Issue
Block a user