浏览代码

Windows: export not supported

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 8 年之前
父节点
当前提交
73932d8d22
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      daemon/export.go

+ 5 - 0
daemon/export.go

@@ -3,6 +3,7 @@ package daemon
 import (
 import (
 	"fmt"
 	"fmt"
 	"io"
 	"io"
+	"runtime"
 
 
 	"github.com/docker/docker/container"
 	"github.com/docker/docker/container"
 	"github.com/docker/docker/pkg/archive"
 	"github.com/docker/docker/pkg/archive"
@@ -12,6 +13,10 @@ import (
 // ContainerExport writes the contents of the container to the given
 // ContainerExport writes the contents of the container to the given
 // writer. An error is returned if the container cannot be found.
 // writer. An error is returned if the container cannot be found.
 func (daemon *Daemon) ContainerExport(name string, out io.Writer) error {
 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)
 	container, err := daemon.GetContainer(name)
 	if err != nil {
 	if err != nil {
 		return err
 		return err