mirror of https://github.com/docker/docs.git
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 <ashahab@altiscale.com> (github: ashahab-altiscale)
This commit is contained in:
parent
8b95ad230e
commit
79f17dcf74
|
@ -316,7 +316,7 @@ func TestRunWithoutNetworking(t *testing.T) {
|
||||||
|
|
||||||
//test --link use container name to link target
|
//test --link use container name to link target
|
||||||
func TestRunLinksContainerWithContainerName(t *testing.T) {
|
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)
|
out, _, _, err := runCommandWithStdoutStderr(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to run container: %v, output: %q", err, out)
|
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
|
//test --link use container id to link target
|
||||||
func TestRunLinksContainerWithContainerId(t *testing.T) {
|
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)
|
cID, _, _, err := runCommandWithStdoutStderr(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to run container: %v, output: %q", err, cID)
|
t.Fatalf("failed to run container: %v, output: %q", err, cID)
|
||||||
|
|
Loading…
Reference in New Issue