I am trying to set env var in my docker compose file but the var does not seems to propagate to my docker.
my docker-compose:
test:
build: ./
environment:
TESTVAR: "YOU ARE BEST"
my dockerfile:
FROM alpine
RUN echo test variable is: $TESTVAR
outputs:
Step 1/2 : FROM alpine
---> 3fd9065eaf02
Step 2/2 : RUN echo test variable is $TESTVAR
---> Running in d5f5505b26db
test variable is
Removing intermediate container d5f5505b26db
---> a9c019ac7eff
Successfully built a9c019ac7eff
Successfully tagged phpfpm_test:latest
Recreating phpfpm_test_1 ... done
Attaching to phpfpm_test_1
Am I missing something?