mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Stop commit on running container
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
599b76000d
commit
4b933dd2ea
1 changed files with 6 additions and 0 deletions
|
@ -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{}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue