|
@@ -9,7 +9,6 @@ import (
|
|
|
|
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/docker/docker/daemon/execdriver"
|
|
"github.com/docker/docker/daemon/execdriver"
|
|
- "github.com/docker/docker/daemon/execdriver/lxc"
|
|
|
|
"github.com/docker/docker/pkg/broadcastwriter"
|
|
"github.com/docker/docker/pkg/broadcastwriter"
|
|
"github.com/docker/docker/pkg/ioutils"
|
|
"github.com/docker/docker/pkg/ioutils"
|
|
"github.com/docker/docker/pkg/stringid"
|
|
"github.com/docker/docker/pkg/stringid"
|
|
@@ -111,8 +110,9 @@ func (d *Daemon) getActiveContainer(name string) (*Container, error) {
|
|
|
|
|
|
func (d *Daemon) ContainerExecCreate(config *runconfig.ExecConfig) (string, error) {
|
|
func (d *Daemon) ContainerExecCreate(config *runconfig.ExecConfig) (string, error) {
|
|
|
|
|
|
- if strings.HasPrefix(d.execDriver.Name(), lxc.DriverName) {
|
|
|
|
- return "", lxc.ErrExec
|
|
|
|
|
|
+ // Not all drivers support Exec (LXC for example)
|
|
|
|
+ if err := checkExecSupport(d.execDriver.Name()); err != nil {
|
|
|
|
+ return "", err
|
|
}
|
|
}
|
|
|
|
|
|
container, err := d.getActiveContainer(config.Container)
|
|
container, err := d.getActiveContainer(config.Container)
|