I need to pass an environment variable as LABEL in Dockerfile, my Dockerfile looks like below:
FROM nginx
LABEL maintainer="blabla"
ENV GROUP="default"
#Checking if Label values can be set from ENV Variables
LABEL group="${GROUP}"
below command to pass the build and run the docker file env variable:
docker build -t nginx:test_label .
docker run -d -e GROUP="mygroup" nginx:test_label
but when doing the inspect of the container, It is giving me label value as default instead of mygroup.
What am I doing wrong?