3

I am trying to set up a development environment for a project which we are adopting. Part of the project is the deployment of Rocketchat with Mongo on Docker. I have installed the legacy DockerToolbox with Oracle VirtualBox, as I am running Windows 10 Home that does not support the current version of Docker and HyperV. I think I have taken all the required steps to install and run the componants, but am unable to connect to localhost.

This is what I have done:

  • Started Docker with Docker Quickstart Terminal

Docker shell

  • Followed instructions in Readme https: //github.com/docker-library/docs/tree/master/rocket.chat

    -> $ docker run --name db -d mongo:3.0 --smallfiles

which downloaded mongo

-> $ docker run --name rocketchat -p 80:3000 --env ROOT_URL=http: //localhost --link db -d rocket.chat

which downloaded rocketchat

docker run commands

  • However, when I try to browse to localhost, localhost:3000, or 127.0.0.1, they are now accessible. Googling for docker and rocketchat suggested that the problem might be that the port 3000 is not open through the firewall. I have enabled it but connection to localhost is still failing.

  • I also thought that I might need to have a server running, so invoked Tomcat. This didn't help either.

  • I have worked through the codeschool try-docker tutorial, but still not quite got the answer.

I am sure that there is something very simple and obvious that I am not doing, but I've been unable to find an answer. Any help would be fantastic! Thank you.

G Harvey
  • 31
  • 1
  • 2
  • Thank you for your suggestion, unfortunately localhost was still not accessible. I'm not entirely sure what is happening. I think the standard docker port is 3000 and the rocket.chat run command connects it to port 80, which should be exposed. I don't see how this relates to localhost, and is this the same localhost exposed by Tomcat or IIS? – G Harvey May 05 '17 at 18:06
  • I think that `-e MONGO_URL=mongodb://db:27017/rocketchat` is missing in your `docker run` command for Rocket.chat. – Rohlik May 06 '17 at 08:52
  • Thank you for your help. No luck sadly :( – G Harvey May 06 '17 at 16:18
  • 1
    What about your Docker container logs? Some hint inside? Use `docker logs NAME_CONTAINER` – Rohlik May 08 '17 at 16:32
  • It sounds like you needed to access at the IP of the virtual machine. Localhost when using these older toolboxes doesn't always refer to the machine you are executing the docker command on. But where the actual docker daemon is running. – Aaron Ogle Jul 23 '17 at 07:02

1 Answers1

1

You have mapped port 80 to 3000 -> you need to access localhost:80 not 3000

tintin
  • 161
  • 3
  • 13