waltcow
waltcow
RRailway
Created by waltcow on 6/20/2024 in #✋|help
Docker build cache issue
https://docs.railway.app/guides/dockerfiles Railway supports cache mounts in your Dockerfile in the following format: --mount=type=cache,id=s/<service id>-<target path>,target=<target path> Replace <service id> with the id of the service.
FROM node:16 as builder

WORKDIR /build

COPY web/package.json .

ARG RAILWAY_SERVICE_ID

RUN --mount=type=cache,id=s/${RAILWAY_SERVICE_ID}-node_modules,target=node_modules
RUN npm install
FROM node:16 as builder

WORKDIR /build

COPY web/package.json .

ARG RAILWAY_SERVICE_ID

RUN --mount=type=cache,id=s/${RAILWAY_SERVICE_ID}-node_modules,target=node_modules
RUN npm install
build logs


[Region: us-west1]

Cache mount ID is not prefixed with cache key


[Region: us-west1]

Cache mount ID is not prefixed with cache key
why RAILWAY_SERVICE_ID can not be retrieved in build time?
6 replies
RRailway
Created by waltcow on 9/26/2023 in #✋|help
railway internal network is unreadable
No description
33 replies
RRailway
Created by waltcow on 7/3/2023 in #✋|help
how to retrieve file in created volume
how to retrieve file in created volume
23 replies