Skip to content

support railway up with dockerfile for docker image services (builder override) #819

@yigitkonur

Description

@yigitkonur

problem

when a service is created with `--image`, subsequent `railway up` source deployments are ignored — the service always pulls the original image. there's no way to switch a service from image-based to source-based deployment via cli.

additionally, `railway.json` with `"builder": "DOCKERFILE"` is not respected by railpack. the dockerfile is ignored even when explicitly configured:

{
  "build": {
    "builder": "DOCKERFILE",
    "dockerfilePath": "Dockerfile"
  }
}

railpack still auto-detects python/node and fails with "no start command detected" despite a valid dockerfile being present.

real-world scenario

deploying a litellm proxy: needed a custom dockerfile that copies a config.yaml into the container. railpack kept detecting the `.yaml` file as python config and ignoring the dockerfile entirely. had to work around by creating a `main.py` shim and using `requirements.txt` instead of the dockerfile.

expected behavior

  1. `railway.json` `builder: DOCKERFILE` should override railpack detection
  2. `railway up` should work for services originally created with `--image`
  3. `railpack.toml` start command should be respected when dockerfile isn't used

related

the `railpack.toml` `[start] cmd = "..."` also wasn't picked up during testing, suggesting the config file discovery may have issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions