Keep getting file not found
jstafford5380
HOBBYOP

2 years ago

I'm doing a dockerfile build and I keep getting an error that a file in my build context is not found.

I'm using a customer docker file path of /src/BarbookApi/Dockerfile and everything in the dockerfile is assuming the repository root as the build context. So for example if my repository is setup like this:

/root
|- src
| |- BarbookApi
| | |- BarbookApi.csproj
| | |- Dockerfile

Then the following should work

COPY src/BarbookApi/BarkbookApi src/BarkbookApi/

This works on my machine :) -- but I can't see if railway is sending a different build context and I can't print out the build context. I've tried the following just so I can see what it's working with:

COPY . /tmp/buildctx
RUN find /tmp/buildctx

But during the run, it wont run because it says it's cached which also doesn't make sense to me; it's brand new.

View Deploy details

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

2 Replies

jstafford5380
HOBBYOP

2 years ago

OMG nevermind... source control was missing a bunch of files /forehead. This is what I get for using a git tool instead of CLI for this one project.


2 years ago

Glad you where able to figure it out!


Loading...