R
Railway•4mo ago
failingbuild

Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"

This works when I deploy these dockerfiles on an ecs container (via ecr) I don't really need to use Docker on railway, but i would prefer not to remove / rename these dockerfiles, so if possible can you disable autodetecting Docker?
Solution:
You would need to either remove or rename them, or update your dockerfile accordingly
Jump to solution
42 Replies
Percy
Percy•4mo ago
Project ID: 32495aae-4b01-4a90-badf-1d53d394b8cd
failingbuild
failingbuild•4mo ago
32495aae-4b01-4a90-badf-1d53d394b8cd
Solution
Brody
Brody•4mo ago
You would need to either remove or rename them, or update your dockerfile accordingly
failingbuild
failingbuild•4mo ago
do you know why these docker files don't work on railway but they work on ECS?
Brody
Brody•4mo ago
because the cache mounts must be in the format --mount=type=cache,id=s/<serviceId>
failingbuild
failingbuild•4mo ago
yeah but why?
Brody
Brody•4mo ago
that's how railway expects them
failingbuild
failingbuild•4mo ago
is this documented somewhere
failingbuild
failingbuild•4mo ago
ok, if i set a railwy config, will that supersede wahtever is automatically selecting this Dockerfile?
Brody
Brody•4mo ago
there is no way to disable the auto detection of the Dockerfile they would need to be moved elsewhere, renamed, or removed
failingbuild
failingbuild•4mo ago
yeah, don't really want to change our prod setup just to see if railway works for us :/
Brody
Brody•4mo ago
you could always create a branch that has the applicable changes on the Dockerfile for testing on Railway
failingbuild
failingbuild•4mo ago
yeah i just think the named Dockerfile would ideally be where our production build lives. Feels like there should be a way to turn this off do you see anything wrong with this part of the dockerfile vs what railway is expecting?
RUN --mount=type=cache,id=s/39cf0fd8-0e6b-4bef-8f82-2e5865bddac1-/var/cache/apk,target=/var/cache/apk \
ln -vsf /var/cache/apk /etc/apk/cache \
&& apk add --update curl git findutils python3 make gcc g++ musl-dev \
jpeg-dev cairo-dev giflib-dev pango-dev
RUN --mount=type=cache,id=s/39cf0fd8-0e6b-4bef-8f82-2e5865bddac1-/var/cache/apk,target=/var/cache/apk \
ln -vsf /var/cache/apk /etc/apk/cache \
&& apk add --update curl git findutils python3 make gcc g++ musl-dev \
jpeg-dev cairo-dev giflib-dev pango-dev
i am still getting the same error
Brody
Brody•4mo ago
is that your service id?
Want results from more Discord servers?
Add your server