Use Dockerfile targets?
polvallverdu
FREEOP

a year ago

Hey!
I'm new to railway, really excited to start using it. I want to deploy my app. It's on a monorepo, and a single Dockerfile is in charge of building different images based on the target.

Here's the Dockerfile, and for reference a docker-compose.build.yaml that servers as a way to build the images.

As an example, coolify supports this feature (where I come from)

Solved

15 Replies

polvallverdu
FREEOP

a year ago

N/A


a year ago

unfortunately railway does not support specfying a target, you would need to break the dockerfile up into separate dockerfiles


polvallverdu
FREEOP

a year ago

Are there any plans to support this in the future?


a year ago

there are no current plans, ive only seen you and one or two other people ask for it in the handful of years I've been doing support, so the drive for us to implement it is not there


polvallverdu
FREEOP

a year ago

wow, interesting… I ended up adding a final step building a final image containing all the targets, which should do the job.


polvallverdu
FREEOP

a year ago

Thank you for the quick response!


a year ago

no problem!


polvallverdu
FREEOP

a year ago

@Brody so the build just failed. I used the new build system.

ProjectId: f0ced8df-4b86-4697-ab99-b97b4c767fd6
ServiceId: 5297753e-5146-472c-af7d-e0099d9d3947
Deployment: 9df0747b-5963-4a85-a015-61f48d594ac0


polvallverdu
FREEOP

a year ago

it says sigkill after not doing anything for 10 minutes


a year ago

please do not use the new builder, it is beta, and will be deprecated soon


a year ago

we cannot provide any support for builds done with it


polvallverdu
FREEOP

a year ago

without the new builder I have to specify a cache id, and I can't do that for each file, since it's everything together


polvallverdu
FREEOP

a year ago

I'm trying to build it with railpack, but now I can't. It says it's configured for docker because the config says so, but that's wrong: https://github.com/wosherco/bashbuddy/blob/main/railway.json


a year ago

If you have a Dockerfile a Dockerfile is what will always be used regardless of what builder you have set.

And just an FYI, the new builder will be deprecated soon and your builds will not be ran with it anymore even if you previously enabled it, so please switch it off before we do.


a year ago

!s


Status changed to Solved brody 12 months ago


Loading...