From 4b933dd2eaae17e4931b7414e3cead370124ec5a Mon Sep 17 00:00:00 2001 From: John Howard Date: Thu, 13 Aug 2015 11:34:34 -0700 Subject: [PATCH] Windows: Stop commit on running container Signed-off-by: John Howard --- builder/job.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builder/job.go b/builder/job.go index 5e3a3c8bdf..43d7fd5470 100644 --- a/builder/job.go +++ b/builder/job.go @@ -7,6 +7,7 @@ import ( "io" "io/ioutil" "os" + "runtime" "strings" "sync" @@ -279,6 +280,11 @@ func Commit(name string, d *daemon.Daemon, c *CommitConfig) (string, error) { return "", err } + // It is not possible to commit a running container on Windows + if runtime.GOOS == "windows" && container.IsRunning() { + return "", fmt.Errorf("Windows does not support commit of a running container") + } + if c.Config == nil { c.Config = &runconfig.Config{} }