$ docker run -u sonnychee -p 3000:3000 -it gc_web:latest
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a93e70c705d3 gc_web:latest “/bin/bash” 14 minutes ago Up 14 minutes 0.0.0.0:3000->3000/tcp insane_kowalevski
I’ve attempted to start up the webserver in 2 ways and both have yielded the same negative result.
Manually enter the command: rails server in the attached tty
Inserting the “rails server” command in the ~/.bashrc file.
The problem you are facing is because you are using wrong ip to access the rails server in curl. You should get the containers IP address and do a curl request. You can get the container IP address as shown below.