R
Railway•4mo ago
macwilko

Docker compose "context", supported in Railway when building a Dockerfile?

I have a Docker compose file I'm trying to bring to Railway, I'm noticing that one Dockerfile fails to build because it can't find the folders its trying to build:
#13 [10/17] COPY manage.py manage.py

#13 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/manage.py": not found



#14 [11/17] COPY plane plane/

#14 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/plane": not found



#15 [12/17] COPY templates templates/

#15 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/templates": not found
#13 [10/17] COPY manage.py manage.py

#13 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/manage.py": not found



#14 [11/17] COPY plane plane/

#14 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/plane": not found



#15 [12/17] COPY templates templates/

#15 ERROR: failed to calculate checksum of ref 7949f621-c09b-43d4-a8c8-8e51ccffaaac::rcdz9vmeslipnvma2a9t0mwhm: "/templates": not found
The only difference I see to the other Dockerfiles in the compose file is it uses a context:
api:
container_name: api
build:
context: ./apiserver
dockerfile: Dockerfile.api
api:
container_name: api
build:
context: ./apiserver
dockerfile: Dockerfile.api
My Dockerfile is built using:
RAILWAY_DOCKERFILE_PATH=./apiserver/Dockerfile.api
RAILWAY_DOCKERFILE_PATH=./apiserver/Dockerfile.api
Solution:
i think? set the root directory to /apiserver and then set RAILWAY_DOCKERFILE_PATH to Dockerfile.api...
Jump to solution
7 Replies
Percy
Percy•4mo ago
Project ID: 7949f621-c09b-43d4-a8c8-8e51ccffaaac,7949f621-c09b-43d4-a8c8-8e51ccffaaac,7949f621-c09b-43d4-a8c8-8e51ccffaaac
Solution
Brody
Brody•4mo ago
i think? set the root directory to /apiserver and then set RAILWAY_DOCKERFILE_PATH to Dockerfile.api
macwilko
macwilko•4mo ago
thats encouraging 🙂 Ty brody! Dumb question, but how do I set the root directory?
Brody
Brody•4mo ago
service settings
macwilko
macwilko•4mo ago
right!
Brody
Brody•4mo ago
somewhere in the source section
macwilko
macwilko•4mo ago
ooof I see it easily missed that one deploying lets seeee that was it awesome :salute: