From 0adfb908a682e679b54f511fe89e668d6e676dda Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Fri, 5 Jun 2015 09:14:19 -0700 Subject: [PATCH] fix lxc build Signed-off-by: Jessica Frazelle --- daemon/execdriver/lxc/driver.go | 2 +- integration-cli/docker_cli_run_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/execdriver/lxc/driver.go b/daemon/execdriver/lxc/driver.go index 4b5730a3f4..692b9f356f 100644 --- a/daemon/execdriver/lxc/driver.go +++ b/daemon/execdriver/lxc/driver.go @@ -124,7 +124,7 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba dataPath = d.containerDir(c.ID) ) - if c.Network.NamespacePath == "" && c.Network.ContainerID == "" { + if c.Network == nil || (c.Network.NamespacePath == "" && c.Network.ContainerID == "") { return execdriver.ExitStatus{ExitCode: -1}, fmt.Errorf("empty namespace path for non-container network") } diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 948f1af7b2..06a978ad24 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -53,6 +53,7 @@ func (s *DockerSuite) TestRunEchoStdoutWithMemoryLimit(c *check.C) { // should run without memory swap func (s *DockerSuite) TestRunWithoutMemoryswapLimit(c *check.C) { + testRequires(c, NativeExecDriver) runCmd := exec.Command(dockerBinary, "run", "-m", "16m", "--memory-swap", "-1", "busybox", "true") out, _, err := runCommandWithOutput(runCmd) if err != nil {