Dockerfile builds and runs my project locally but does not work in Railway

eriktoorHOBBY

4 months ago

I am trying to run my express app and it is in a monorepo. I have a dockerfile that works but it is not working for my in railway.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

9 Replies


eriktoorHOBBY

4 months ago

Locally this is workinig for me when I run from the root directory
docker build -t my-backend . 
docker run -p 8000:8000 my-backend

Does railway run something different?


4 months ago

Hello,

Have you checked out the build logs to see the error its falling with? once you do that and see the error you can then apply the fix to your codebase needed to resolve the error.


eriktoorHOBBY

4 months ago

Hm I don't know why my docker build would work but that wouldn't but I just patched the error thanks for the advice.


Status changed to Solved brody 4 months ago


Status changed to Open eriktoor 4 months ago


eriktoorHOBBY

4 months ago

Hey sorry about re-opening but do you know what command Railway is running when you see a Dockerfile? Because my dockerfile works and this works locally for me but I am still seeing railway failures...


eriktoorHOBBY

4 months ago

Is it possible something is cached?


4 months ago

This would have been an issue with your project given the error was printed from running your build command, the error wasn't printed by our infrastructure.


eriktoorHOBBY

4 months ago

Yeah I'm just trying to repro locally what you guys will run when you see a Dockerfile.


4 months ago

We use buildkit if that's helpful.

Either way, no errors locally or not, there was a misconfirmation somewhere in your project to produce that error.