mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Fix golint daemon breaking commit
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
2434bd8e63
commit
cfddca2bf9
3 changed files with 1 additions and 27 deletions
|
@ -24,7 +24,7 @@ func (daemon *Daemon) Commit(container *Container, c *ContainerCommitConfig) (*i
|
||||||
defer container.unpause()
|
defer container.unpause()
|
||||||
}
|
}
|
||||||
|
|
||||||
rwTar, err := container.exportRw()
|
rwTar, err := container.exportContainerRw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,7 @@ import (
|
||||||
"github.com/docker/docker/daemon/execdriver"
|
"github.com/docker/docker/daemon/execdriver"
|
||||||
"github.com/docker/docker/daemon/links"
|
"github.com/docker/docker/daemon/links"
|
||||||
"github.com/docker/docker/daemon/network"
|
"github.com/docker/docker/daemon/network"
|
||||||
"github.com/docker/docker/pkg/archive"
|
|
||||||
"github.com/docker/docker/pkg/directory"
|
"github.com/docker/docker/pkg/directory"
|
||||||
"github.com/docker/docker/pkg/ioutils"
|
|
||||||
"github.com/docker/docker/pkg/nat"
|
"github.com/docker/docker/pkg/nat"
|
||||||
"github.com/docker/docker/pkg/stringid"
|
"github.com/docker/docker/pkg/stringid"
|
||||||
"github.com/docker/docker/pkg/system"
|
"github.com/docker/docker/pkg/system"
|
||||||
|
@ -957,21 +955,6 @@ func (container *Container) initializeNetworking() error {
|
||||||
return container.buildHostnameFile()
|
return container.buildHostnameFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (container *Container) exportRw() (archive.Archive, error) {
|
|
||||||
if container.daemon == nil {
|
|
||||||
return nil, fmt.Errorf("Can't load storage driver for unregistered container %s", container.ID)
|
|
||||||
}
|
|
||||||
archive, err := container.daemon.diff(container)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return ioutils.NewReadCloserWrapper(archive, func() error {
|
|
||||||
err := archive.Close()
|
|
||||||
return err
|
|
||||||
}),
|
|
||||||
nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (container *Container) getIpcContainer() (*Container, error) {
|
func (container *Container) getIpcContainer() (*Container, error) {
|
||||||
containerID := container.hostConfig.IpcMode.Container()
|
containerID := container.hostConfig.IpcMode.Container()
|
||||||
c, err := container.daemon.Get(containerID)
|
c, err := container.daemon.Get(containerID)
|
||||||
|
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/docker/daemon/execdriver"
|
"github.com/docker/docker/daemon/execdriver"
|
||||||
"github.com/docker/docker/pkg/archive"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultPathEnv is deliberately empty on Windows as the default path will be set by
|
// DefaultPathEnv is deliberately empty on Windows as the default path will be set by
|
||||||
|
@ -144,14 +143,6 @@ func (container *Container) allocateNetwork() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (container *Container) exportRw() (archive.Archive, error) {
|
|
||||||
if container.IsRunning() {
|
|
||||||
return nil, fmt.Errorf("Cannot export a running container.")
|
|
||||||
}
|
|
||||||
// TODO Windows. Implementation (different to Linux)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (container *Container) updateNetwork() error {
|
func (container *Container) updateNetwork() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue