Skip to content

Commit 5459ef0

Browse files
author
John Howard
committed
LCOW: Don't block export
Signed-off-by: John Howard <[email protected]>
1 parent 6f19078 commit 5459ef0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

daemon/export.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ import (
1313
// ContainerExport writes the contents of the container to the given
1414
// writer. An error is returned if the container cannot be found.
1515
func (daemon *Daemon) ContainerExport(name string, out io.Writer) error {
16-
if runtime.GOOS == "windows" {
17-
return fmt.Errorf("the daemon on this platform does not support export of a container")
18-
}
19-
2016
container, err := daemon.GetContainer(name)
2117
if err != nil {
2218
return err
2319
}
2420

21+
if runtime.GOOS == "windows" && container.Platform == "windows" {
22+
return fmt.Errorf("the daemon on this platform does not support exporting Windows containers")
23+
}
24+
2525
data, err := daemon.containerExport(container)
2626
if err != nil {
2727
return fmt.Errorf("Error exporting container %s: %v", name, err)

0 commit comments

Comments
 (0)