[solved] Docker: build_args_from_env from secrets

Hi all,

I’ve just tried to set ENV variables in a Dockerfile during build - I’ve setup my drone.yml according to the documentation (see: Example configuration passing secrets as build arguments)

My yaml file is as follows:

And the secret setup:

In the docker file I’ve tried both variants (see Docker docs):

But docker inspect always shows an empty ENV variable:

Also I’ve noticed following outputs during image creation:

and that the build args are set twice:

Any ideas?

Thanks for helping!

Cheers,
Marcus

Gna - I’ve solved it … I was so focused on the build args and the env variables that I completely overlooked that I was missing the ARG assignment:

image

But the double --build-args are still there…