Can’t you use ENV?

Can’t you use ENV?
3 Replies
henri
henri3w ago
@kian not really, since ENV only sets the value for a new env var, instead of loading it. "image_vars" and envVars can only be used in runtime, but I need to use a secret in the Dockerfile definition, when the container is being built.
Wonky Onion
Wonky Onion3w ago
Image vars is build time, wrangler basically just passes that to build args in docker build. Have you tried and had issues with it? Feel free to throw up a bug report on workers sdk if you are
kian
kianOP3w ago
I think it's the same use-case as define in config vs. --define on deploy - the CLI flag needs to be there so you can do --image-vars "GIT_HASH:'$(git rev-parse HEAD)'"

Did you find this page helpful?