Watch folders & custom Dockerfile
shxkm
PROOP

7 months ago

I have a prometheus service in a mono repo, basically laid out like this:

Dockerfile
[main project files]
prometheus/
   Dockerfile
   prometheus.yml

I've successfuly set Railway to look at prometheus/Dockerfile for this service, but it seems to fail because it can't find the prometheus.yml adjacent to the Dockerfile it's using:

Dockerfile:8

-------------------

6 |

7 |     # Copy the prometheus configuration

8 | >>> COPY prometheus.yml /etc/prometheus/prometheus.yml

9 |

10 |     # Create auth directory and files

-------------------

ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref 8zznmm2qp77p10scanhloon7m::ovp8q7o3dgjpkk4k9vynvv76c: "/prometheus.yml": not found

This hints that Railway may not be setting the context correctly, or I don't understand how context works in Dockerfiles.

Solved

5 Replies

shxkm
PROOP

7 months ago

715a154f-c769-440d-9dad-373a1d7efafe


shxkm
PROOP

7 months ago

Ah, root directory?


shxkm
PROOP

7 months ago

Of course


7 months ago

Yep! you had the root directory previously set to the root, and there is no yaml file in the root.


7 months ago

!s


Status changed to Solved brody 7 months ago


Loading...