note: using podman with docker symlink
I am getting this error when trying to run a yarn build script and I am guessing that it's related to missing mount privileges that Podman has to the host (although the dagger container is run with --privileged)
Error: failed to solve: process "yarn run build some-app" did not complete successfully: failed to get unprivileged mount flags for {Destination:/build/.yarnrc.yml Type:bind Source:/var/lib/dagger/runc-overlayfs/cachemounts/buildkit1770124651/.yarnrc.yml Options:[rbind] UIDMappings:[] GIDMappings:[]}: no such file or directory
related function
func buildBuilder(
client *dagger.Client,
ctx context.Context,
img *dagger.Container,
sourceDir *dagger.Directory,
) *dagger.Container {
fmt.Println("running ", getFunctionName())
app, appHome, appDistHome := getAppVars()
builder := img.WithEnvVariable("APP", app).
WithMountedFile("/build/package.json", sourceDir.File("package.json")).
WithMountedFile("/build/yarn.lock", sourceDir.File("yarn.lock")).
WithMountedFile("/build/.yarnrc.yml", sourceDir.File(".yarnrc.yml")).
WithEnvVariable("APP_HOME", appHome).
WithEnvVariable("APP_DIST_HOME", appDistHome).
WithEnvVariable("NODE_ENV", "production").
WithEnvVariable("NODE_OPTIONS", "--max-old-space-size=8192").
WithWorkdir("/build").
WithEntrypoint(nil).
WithExec([]string{"yarn", "run", "build", app, "--prod"})
debug(builder, ctx)
return builder
}