R
Join ServerRailway
✋|help
Cache mount ID is not prefixed with cache key when deploying test instance
Hello all,
today I tried to boot up my test instance but every attempt at doing so lead the deploys to fail immediately with the error
The Dockerfile used to build the project is the following (as copied from GitHub https://github.com/Stickerifier/Stickerify/blob/migrate-to-telegram-bot-api/Dockerfile):
It's also worth keeping in mind I configured the shared environment variable (used both by Production and Test)
This failure seems strange to me since everything works properly in my production environment.
The project ID is f6d25e17-9bb2-457f-8ce2-e55b5ce1dcd8
today I tried to boot up my test instance but every attempt at doing so lead the deploys to fail immediately with the error
Cache mount ID is not prefixed with cache key
(no further information are present in build logs).The Dockerfile used to build the project is the following (as copied from GitHub https://github.com/Stickerifier/Stickerify/blob/migrate-to-telegram-bot-api/Dockerfile):
FROM gradle:8.0-jdk19 AS builder
WORKDIR /app
COPY settings.gradle build.gradle ./
COPY gradle/libs.versions.toml ./gradle/
RUN \
--mount=type=cache,id=cache-dependencies,target=/home/gradle/.gradle/caches \
gradle dependencies --no-daemon
COPY . .
RUN gradle shadowJar --no-daemon
FROM eclipse-temurin:19 AS bot
RUN \
--mount=type=cache,id=cache-apt,target=/var/cache/apt \
apt-get -y update && apt-get -y upgrade && \
apt-get install -y --no-install-recommends ffmpeg
ARG STICKERIFY_TOKEN
ENV STICKERIFY_TOKEN $STICKERIFY_TOKEN
WORKDIR /app
COPY --from=builder /app/build/libs .
CMD ["java", "-jar", "Stickerify-shadow.jar"]
It's also worth keeping in mind I configured the shared environment variable (used both by Production and Test)
RAILWAY_DOCKERFILE_PATH
with value Railway.dockerfile
where I'd execute the following instructions:FROM rob93c/stickerify
ARG STICKERIFY_TOKEN
ENV STICKERIFY_TOKEN $STICKERIFY_TOKEN
This failure seems strange to me since everything works properly in my production environment.
The project ID is f6d25e17-9bb2-457f-8ce2-e55b5ce1dcd8
Is there any news about this?
I just tried and it's still happening in my test environment
To me it's very strange since Railway on that instance should be picking
Also, if I don't change my
I just tried and it's still happening in my test environment
To me it's very strange since Railway on that instance should be picking
Railway.dockerfile
(but no logs are shown in the build view, apart from the error I reported)Also, if I don't change my
Dockerfile
to add ,id=cache-dependencies
and ,id=cache-apt
I get the error Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>
okay so I have asked jr myself about this, the id needs to be prefixed with your service id, anything else won't work at the moment. so when it gives you that error, this is the format it wants for the id..
id=s/<service-id>-/root/.gradle
I must say I'm confused by that but I see it works
Do you think this it a bug at some level on the tools I'm using or is it simply a wrong Dockerfile configuration on my side?
Do you think this it a bug at some level on the tools I'm using or is it simply a wrong Dockerfile configuration on my side?
its just how railway wants the cache id formatted