mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
Merge pull request #8191 from vieux/improve_error_exec_lxc
Improve error for docker exec & LXC
This commit is contained in:
@@ -6,9 +6,11 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/docker/docker/daemon/execdriver"
|
||||
"github.com/docker/docker/daemon/execdriver/lxc"
|
||||
"github.com/docker/docker/engine"
|
||||
"github.com/docker/docker/pkg/broadcastwriter"
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
@@ -103,6 +105,10 @@ func (d *Daemon) ContainerExecCreate(job *engine.Job) engine.Status {
|
||||
return job.Errorf("Usage: %s [options] container command [args]", job.Name)
|
||||
}
|
||||
|
||||
if strings.HasPrefix(d.execDriver.Name(), lxc.DriverName) {
|
||||
return job.Error(lxc.ErrExec)
|
||||
}
|
||||
|
||||
var name = job.Args[0]
|
||||
|
||||
container, err := d.getActiveContainer(name)
|
||||
|
||||
Reference in New Issue
Block a user