Closed OnerInce closed 1 year ago
mode=max
is not a valid attribute for cache-from
: https://docs.docker.com/build/cache/backends/gha/#synopsis
Do you have a link to your repo? Hard to tell without logs and full workflow. Also if it works locally what local command did you invoked?
It is a private repo unfortunately and yes, image builds all fine locally. using docker build. Added full workflow definition to original message, there is nothing else on logs other than the error message.
Also if it works locally what local command did you invoked?
^
Also if it works locally what local command did you invoked?
^
docker build -t my_image -f frontend-next/Dockerfile.prod ./frontend-next
Well "/app/public": not found
means this folder does not exist in your ./frontend-next
context. You can find out by adding this step right before - name: Build initial image
:
- run: tree -nh ./frontend-next
Either you have local changes not pushed or they are gitignored.
Well, it turns out public folder was empty. So it doesn't exist on Github. There was nothing wrong with caching. Wasted several hours with it :)
I am trying to build following multi-stage Dockerfile:
However, it fails on the last stage. Error message is:
buildx failed with: ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ixtqd2us9kaftl9v6qm0kc0rt::vteockhvetegcevutywlk57tn: "/app/public": not found
.Dockerfile building fine on local, that means something wrong with caching. I have tried different caching parameters but no luck. My Github Workflow definition as follows: