R
Railwayβ€’9mo ago
3005

Invalid cache mount

Hi, i tried to follow this format for my Dockerfile: id=s/<service-id>-/root/.gradle As mentioned by Brody. However now the error changed to: "Invalid cache mounts" Attached the Dockerfile.
33 Replies
Percy
Percyβ€’9mo ago
Project ID: a564e554-2294-490d-b39d-231f70974e23
3005
3005β€’9mo ago
a564e554-2294-490d-b39d-231f70974e23
Brody
Brodyβ€’9mo ago
are you positive all the cache mount IDs are for the service you are deploying that dockerfile to?
3005
3005β€’9mo ago
yes, just double checked
Brody
Brodyβ€’9mo ago
okay I will have a closer look at that dockerfile when on my computer, there's a whole lot going on with it this may be a silly question, but does it need to be that complex?
3005
3005β€’9mo ago
Thank you, Brody! Unfortunately, yes 😦
Brody
Brodyβ€’9mo ago
without looking at it in depth yet, what does it deploy
3005
3005β€’9mo ago
Docker-based Open edX distribution
Brody
Brodyβ€’9mo ago
never heard of it, cool so what is your service id anyway?
3005
3005β€’9mo ago
b39f11ea-b215-4734-9149-8b7f054b9b75
Brody
Brodyβ€’9mo ago
my first guess would be all this template stuff getting in the way
3005
3005β€’9mo ago
tried to simplify/remove templates, didn't help 😦
3005
3005β€’9mo ago
still getting "Invalid cache mounts"
Brody
Brodyβ€’9mo ago
i dont see any issues with it, im sorry i dont know whats going wrong
3005
3005β€’9mo ago
Maybe someone else from the team could look at it? Thank you for putting your time to fix it, Brody
Brody
Brodyβ€’9mo ago
jr is already in this thread actually, he does a lot of work with railways builder so he would have a much better idea of what's up
3005
3005β€’9mo ago
By the way i've tried to remove the gradle part, also didn't help Any updates on the issue? salute
Brody
Brodyβ€’9mo ago
welp it's now the weekend, the team doesn't work on the weekend unfortunately you could get this to work without the cache stuff, for now
joaops95
joaops95β€’9mo ago
I have the same problem ...
joaops95
joaops95β€’9mo ago
Brody
Brodyβ€’9mo ago
unlike their dockerfile, you aren't using the correct cache mount id
3005
3005β€’9mo ago
salutemildpanic let me know if you find the issue <:meow_wine:802401834643882034>
Brody
Brodyβ€’9mo ago
^ you are using a gradle cache id for everything you are even trying to cache apt installs, nixpacks doesnt even do that
3005
3005β€’9mo ago
nixpacks?
Brody
Brodyβ€’9mo ago
please try removing the cache stuff from your dockerfile
3005
3005β€’9mo ago
I've removed anything related to cache but still getting cache mount errors hmm
Brody
Brodyβ€’9mo ago
you removed some RUN keywords please remove all mount stuff
3005
3005β€’9mo ago
Dockerfile:258 ------------------- 256 | 257 | # Copy the default uWSGI configuration 258 | >>> COPY --chown=app:app settings/uwsgi.ini . 259 | 260 | # Run server ------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 218eb397-8aba-45a5-9a9a-474741a028e0::cdb76dq51h170ohw3ooz02o1a: "/settings/uwsgi.ini": not found
Brody
Brodyβ€’9mo ago
"/settings/uwsgi.ini": not found
3005
3005β€’9mo ago
Brody
Brodyβ€’9mo ago
^
3005
3005β€’9mo ago
Yes, but i guess it's still because I can't use cache though
Brody
Brodyβ€’9mo ago
it means that file at that path wasn't found, has nothing to do with cache