Can't attach terminal to a running container in docker

I’m giving a try to :

https://github.com/rainforestapp/Docker-Terminal

  • nginx: use environment variables
  • How to delete interface docker0
  • php(unit) not displaying error output in docker container
  • docker not building a new clean image
  • Clone an image from a docker registry to another
  • How to access mysql outside my kubernetes cluster?
  • I have turned docker to listen tcp; so i have successfully opened port 4242 (-d -H=tcp://localhost:4242); I run a bare container:

    docker pull dhrp/sshd
    

    And then ran:

    docker run -d -t dhrp/sshd
    

    I can see the container running; but when I attach to it (using Docker Terminal) it shows : Session started and then nothing.

    What am I doing wrong here ?

    Thanks

  • Can't kill supervisord inside of docker container
  • Use encrypted client certificate to connect to a docker host
  • docker-composer.yml not work properly
  • Docker tomcat not accessible from browser
  • Spring boot with docker unable to find valid certification path to requested target error
  • Artifactory pro server behind an nginx frontend
  • One Solution collect form web for “Can't attach terminal to a running container in docker”

    First, the dhrp/sshd image will start a ssh server. There is no point in attaching to it. You can ssh to it.

    If you want to attach to a running container, you need to do a couple of things:

    1. Start the docker daemon in TCP mode (docker -d -H tcp://) WARNING: Insecure.
    2. Put the correct host/port in Docker-Terminal’s index.html in data-docker-terminal-host (the port is 4243)
    3. Start a container
    4. Put the ID of the running container you want to attach to in data-docker-terminal-container still in Docker-Terminal’s index.html
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.