From 79f17dcf7404d0547db68dba8b629c9c1141e47b Mon Sep 17 00:00:00 2001 From: Abin Shahab Date: Sun, 18 Jan 2015 03:21:45 +0000 Subject: [PATCH] LXC needs stdin for container to remain up To run shell(and not exit), lxc needs STDIN. Without STDIN open, it will exit 0. Signed-off-by: Abin Shahab (github: ashahab-altiscale) --- integration-cli/docker_cli_run_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 21bd4fa725..0a6f3d2f4b 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -316,7 +316,7 @@ func TestRunWithoutNetworking(t *testing.T) { //test --link use container name to link target func TestRunLinksContainerWithContainerName(t *testing.T) { - cmd := exec.Command(dockerBinary, "run", "-t", "-d", "--name", "parent", "busybox") + cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "--name", "parent", "busybox") out, _, _, err := runCommandWithStdoutStderr(cmd) if err != nil { t.Fatalf("failed to run container: %v, output: %q", err, out) @@ -342,7 +342,7 @@ func TestRunLinksContainerWithContainerName(t *testing.T) { //test --link use container id to link target func TestRunLinksContainerWithContainerId(t *testing.T) { - cmd := exec.Command(dockerBinary, "run", "-t", "-d", "busybox") + cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "busybox") cID, _, _, err := runCommandWithStdoutStderr(cmd) if err != nil { t.Fatalf("failed to run container: %v, output: %q", err, cID)