Looks like your app is listening on 127.0.0.1. You may need to listen on 0.0.0.0 instead.

I'm getting this error message when I try to build my project. Is there a simple thing I can add to my Dockerfile to make this fix?
11 Replies
Rumon
Rumon3y ago
Share your Dockerfile.
araik49
araik49OP3y ago
GitHub
octobox-docker/Dockerfile at master · kiarafbickers/octobox-docker
📮Untangle your GitHub Notifications. Contribute to kiarafbickers/octobox-docker development by creating an account on GitHub.
Finn
Finn3y ago
i dont know rails but does RUN RAILS_ENV=development make it listen on localhost? It should be running in prod mode ( whatever that means in rails land )
Rumon
Rumon3y ago
And what's the error message?
Finn
Finn3y ago
That it's running on localhost I asume
angelo
angelo3y ago
Yep, this is an issue with your code, not Docker
araik49
araik49OP3y ago
I asked the devs of the project, and they suggested that I add RAILS_ENV=development as an environment variable in Railway, but that seems to produce it's own error. https://github.com/octobox/octobox/issues/3145
GitHub
Run Production from Dockerfile, not Docker Compose? · Issue #3145 ·...
Are you experiencing this issue in octobox.io or your own instance? My instance If your issue is related to an Octobox.io subscription purchase please ensure you have installed the Octobox GitHub A...
araik49
araik49OP3y ago
========================
Container Start Failure!
========================
rpc error: code = Unknown desc = Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "RAILS_ENV=production": executable file not found in $PATH: unknown
========================
Container Start Failure!
========================
rpc error: code = Unknown desc = Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "RAILS_ENV=production": executable file not found in $PATH: unknown
I'm using this as the start command, RAILS_ENV=production bundle exec puma -C config/puma.rb Looks like it's getting closer... https://web-production-644b.up.railway.app/ I changed the build command to this, bundle exec puma -C config/puma.rb and added the environment variable to RAILS_ENV=development.
Finn
Finn3y ago
Have your tied letting nixpacks do its thing? Ie not setting any start commands. https://nixpacks.com/docs/providers/ruby Might help, I can see some of the words in your command are on that page. Otherwise you can try creating a dockerfile for your project. Altho nixpacks >>>> dockerfile
Ruby | Nixpacks
App source + Nix packages + Docker = Image
araik49
araik49OP3y ago
Yeah, I removed my custom start commands and it's building now. Last hurdle is to fix the blocked host error message I'm getting without breaking the successful build. https://web-production-644b.up.railway.app/
Finn
Finn3y ago
Looks like you just need to run a dB migration of some kind?
Want results from more Discord servers?
Add your server