#Environment variable propagation
1 messages · Page 1 of 1 (latest)
Yes, that's right.
Cool! Experimentally, it didn’t look like it was getting set, so I’ll try to debug. Maybe there is some caching in the way.
OK, I added some debugging and I'm calling (*Container) EnvVariable(..., "MAKEFLAGS") before each exec make, and it's never set.
You mean WithEnvVariable? Can you show a simple example?
IIUC EnvVariable fetches an environment variable from the container.
I can't share code, but I'm doing this:
builder := base.WithEnvVariable("MAKEFLAGS", "-j8").
With(func(...) { return buildThingA(...) }.
With(func(...) { return buildThingB(...) }
And in the nested container funcs, I don't see a value for MAKEFLAGS
Sorry, need to see more. You don't need to share, just if you can make a small example where I can run and confirm the same result.
Try adding a cache busting var to confirm if it's cache related: https://docs.dagger.io/cookbook#invalidate-cache
no worries; if I have tiime I'll try to make an example
It was a bug in my code. I was had a With() that was capturing the container from the outer function rather than using the parameter.