mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix lxc build
Signed-off-by: Jessica Frazelle <princess@docker.com>
This commit is contained in:
parent
cd1a1ee972
commit
0adfb908a6
2 changed files with 2 additions and 1 deletions
|
@ -124,7 +124,7 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
|
||||||
dataPath = d.containerDir(c.ID)
|
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")
|
return execdriver.ExitStatus{ExitCode: -1}, fmt.Errorf("empty namespace path for non-container network")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ func (s *DockerSuite) TestRunEchoStdoutWithMemoryLimit(c *check.C) {
|
||||||
|
|
||||||
// should run without memory swap
|
// should run without memory swap
|
||||||
func (s *DockerSuite) TestRunWithoutMemoryswapLimit(c *check.C) {
|
func (s *DockerSuite) TestRunWithoutMemoryswapLimit(c *check.C) {
|
||||||
|
testRequires(c, NativeExecDriver)
|
||||||
runCmd := exec.Command(dockerBinary, "run", "-m", "16m", "--memory-swap", "-1", "busybox", "true")
|
runCmd := exec.Command(dockerBinary, "run", "-m", "16m", "--memory-swap", "-1", "busybox", "true")
|
||||||
out, _, err := runCommandWithOutput(runCmd)
|
out, _, err := runCommandWithOutput(runCmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue