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.6 Replies
Project ID:
cf0243ae-9b90-4be5-a505-5d7f2bf8e6d3
cf0243ae-9b90-4be5-a505-5d7f2bf8e6d3
please send a new screenshot without the rectangles, nothing is sensitive there
Solution
you can only use cache type mounts, not bind mounts
and fwiw the way you are using bind mounts provides negligible performance improvements at best