docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

"4. Run a container" in the install-w-machine.md needs -i flag added to the docs #2033

Closed kamigerami closed 8 years ago

kamigerami commented 8 years ago

Output of docker version:

1.10.3

Swarm version 1.1.3

Additional environment details (AWS, VirtualBox, physical, etc.):

Vagrant / Virtualbox

Steps to reproduce the issue:

  1. Run swarm manager with x nodes
  2. export DOCKER_HOST=ip:port
  3. docker run hello-world

Describe the results you received:

No output thought the container runs fine and exits.

[root@dockerswarm-01 vagrant]# docker ps -a
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS                      PORTS               NAMES
b239897102fb        hello-world              "/hello"                 12 minutes ago      Exited (0) 12 minutes ago                       swarmnode-03.example.com/prickly_raman

Describe the results you expected:

$ docker run hello-world
Hello from Docker.
.
.
.

As in what the docs suggest

"4. Run a container on the Swarm." https://docs.docker.com/swarm/install-w-machine/

Additional information you deem important (e.g. issue happens only occasionally):

Update docs to provide the -i flag to the docker run command when using swarm so the -i flag allows us to make an interactive connection by grabbing the standard in (STDIN) of the container and outputing the "Hello from Docker"

kamigerami commented 8 years ago

dibs

dongluochen commented 8 years ago

@kamigerami I don't remember having this problem. Is your stdout get redirected? Could Vagrant change CLI environment?

kamigerami commented 8 years ago

@dongluochen - I do get the output if I use the -i flag. Not sure if vagrant actually does something however I'll try the CLI directly from virtualbox and report back.

I'll try it out with docker machine on my Mac (as the docs suggest) as well.

I'll even try it out on actual vmware hosts running swarm (and leave out vagrant altogether) just to make sure.

kamigerami commented 8 years ago

I can confirm that it works fine without the -i flag using only virtualbox or only vmware or only docker-machine on my local workstation (not using vagrant).

So when using vagrant the -i option might be needed.

Closing this.