couldn't locate a dockerfile at path /api/Dockerfile in code archive
shiva
PROOP

2 months ago

while deploying this error is coming

Attachments

Solved

7 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


proudparrot2
HOBBY

2 months ago

Is there a Dockerfile at api/Dockerfile in your repository?


shiva
PROOP

2 months ago

No


shiva
PROOP

2 months ago

I resolved it like this i've to forcefully create a dockerfile at api/Dockerfile like this below then it also railway.toml file [build]

builder = "DOCKERFILE"

[deploy]

restartPolicyType = "ON_FAILURE"

restartPolicyMaxRetries = 10

FROM node:20-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

EXPOSE 5060

CMD ["npm", "start"]

brody
EMPLOYEE

2 months ago

You had your root directory set to /api and your builder set to "DOCKERFILE" so we looked for a Dockerfile at /api/Dockerfile.


Status changed to Awaiting User Response Railway 2 months ago


proudparrot2
HOBBY

2 months ago

Good to hear you solved it, but Railway normally won't try to use a non-existant Dockerfile if you didn't configure it yourself. Do you have any root directories configured in Service > Settings > Source?

Attachments


Status changed to Awaiting Railway Response Railway 2 months ago


brody

You had your root directory set to /api and your builder set to "DOCKERFILE" so we looked for a Dockerfile at /api/Dockerfile.

shiva
PROOP

2 months ago

oh i see, I just checked you're right builder was set for the "DOCKERFILE"

Attachments


Status changed to Solved brody 2 months ago


Loading...