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
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):
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:
This failure seems strange to me since everything works properly in my production environment.
The project ID is f6d25e17-9bb2-457f-8ce2-e55b5ce1dcd813 Replies
Project ID:
f6d25e17-9bb2-457f-8ce2-e55b5ce1dcd8,8c4e4e87-7cf3-4ab2-9ec2-b6cc41db7b5b
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
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?
its just how railway wants the cache id formatted
I hit this error too. What exactly is the format it wants?
I have the following line in my Dockerfile and still got the error "Cache mount ID is not prefixed with cache key"
sorry, what is
<service-id>
here?your railway service id
RUN --mount=type=cache,id=c23befe0-e87a-42f6-a6d5-c4a5c738679d-cache-pnpm,target=/pnpm/store pnpm install --frozen-lockfile
still fails with the same error
its fine, I don't need to cache there.I don't understand what format it wants. I have it prefixed with the service id.
the format is shown in that message