Invalid Cache Mounts

Running into a wall with trying to run a fairly straightforward Go HTTP server. Using the newer features in the stdlib for net/http on Go 1.22. So after multiple build failures before learning Nixpacks doesn't support that version yet, I'm having to go the Dockerfile route. Using the generated Dockerfile, which uses caches for the build steps, I added the id=<service_id>-<path>,target=<path> where needed, but I still am running into the error Invalid cache mounts. I've attached a screenshot of the relevant Dockerfile parts and the error in the build logs.
No description
No description
Solution:
you can only use cache type mounts, not bind mounts
Jump to solution
6 Replies
Percy
Percy7mo ago
Project ID: cf0243ae-9b90-4be5-a505-5d7f2bf8e6d3
AnarchoProgrammer
AnarchoProgrammerOP7mo ago
cf0243ae-9b90-4be5-a505-5d7f2bf8e6d3
Brody
Brody7mo ago
please send a new screenshot without the rectangles, nothing is sensitive there
AnarchoProgrammer
AnarchoProgrammerOP7mo ago
No description
Solution
Brody
Brody7mo ago
you can only use cache type mounts, not bind mounts
Brody
Brody7mo ago
and fwiw the way you are using bind mounts provides negligible performance improvements at best
Want results from more Discord servers?
Add your server