Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
| ... | ... |
@@ -2,6 +2,7 @@ package daemon |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"fmt" |
| 5 |
+ "strings" |
|
| 5 | 6 |
|
| 6 | 7 |
"github.com/docker/docker/engine" |
| 7 | 8 |
"github.com/docker/docker/graph" |
| ... | ... |
@@ -22,6 +23,9 @@ func (daemon *Daemon) ContainerCreate(job *engine.Job) engine.Status {
|
| 22 | 22 |
config := runconfig.ContainerConfigFromJob(job) |
| 23 | 23 |
hostConfig := runconfig.ContainerHostConfigFromJob(job) |
| 24 | 24 |
|
| 25 |
+ if len(hostConfig.LxcConf) > 0 && !strings.Contains(daemon.ExecutionDriver().Name(), "lxc") {
|
|
| 26 |
+ return job.Errorf("Cannot use --lxc-conf with execdriver: %s", daemon.ExecutionDriver().Name())
|
|
| 27 |
+ } |
|
| 25 | 28 |
if hostConfig.Memory != 0 && hostConfig.Memory < 4194304 {
|
| 26 | 29 |
return job.Errorf("Minimum memory limit allowed is 4MB")
|
| 27 | 30 |
} |