I’m building a Go app and I have a multistage Dockerfile that makes use of BuildKit statements like
For example :
RUN --mount=type=cache,id=gomod,target=/go/pkg/mod go mod download
This works well between Docker build steps, but when I try to use this image to run
go test as a freestyle step command, the cache directories are missing (and my test command can’t even download private dependencies again unless I set up git authentication in this step as well)
Is there any way to mount these Docker cache directories as a volume in the freestyle step ?
For now I’ve had to remove the
--mount=type=cache statements completely.