Merge pull request #27167 from Microsoft/jjh/blockexport

Windows: export not supported
Upstream-commit: f19120c305de68b1af5062479c19894fc85ecbb3
Component: engine
This commit is contained in:
Brian Goff
2016-10-06 16:05:36 +02:00
committed by GitHub

View File

@ -3,6 +3,7 @@ package daemon
import (
"fmt"
"io"
"runtime"
"github.com/docker/docker/container"
"github.com/docker/docker/pkg/archive"
@ -12,6 +13,10 @@ import (
// ContainerExport writes the contents of the container to the given
// writer. An error is returned if the container cannot be found.
func (daemon *Daemon) ContainerExport(name string, out io.Writer) error {
if runtime.GOOS == "windows" {
return fmt.Errorf("the daemon on this platform does not support export of a container")
}
container, err := daemon.GetContainer(name)
if err != nil {
return err