I created a docker image with a bare-bones rails app - it just serves up the scaffolding page. I’ve confirmed this with curl.
When I attempt to access the rails (Webbrick) webserver from the host, I consistently get:
$ curl 0.0.0.0:3000
curl: (56) Recv failure: Connection reset by peer
I started up the container with:
$ 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.
Any suggestions would be very welcome.