Docker Community Forums

Share and learn in the Docker community.

Docker Cloud - Automated build environment variables not being set

bugfixes
automatedbuilds
dockercloud

(Wrix) #1

When using Docker Cloud Building tools, if you set environment variables, they are not being set when building the image.

I have tried so many different variations of docker files.For example.

ARG MY_ARG=DefaultValue
ENV MY_ENV=$MY_ARG

Program will echo DefaultValue if i have a key in Docker Cloud called MY_ARG with value test

ENV MY_ENV=DefaultValue

Program will echo DefaultValue if i have a key in Docker Cloud called MY_ENV with value test

I have tried all the variations here. Seems it just doesn’t work at all.
Would be really nice if someone from Docker would answer if this is an actual bug…


(Bithive) #2

For reference purposes, this seems related to: Docker Cloud build environment variables not being passed to the auto-build


(David Bainbridge) #3

I have been assuming that the values set in the BUILD ENVIRONMENT VARIABLES section of the auto build would be passed to the docker build command as build args. This does not seem to be the case. What is the purpose or what are the values in BUILD ENVIRONMENT VARIABLES meant to do or be used for?