I build a dockerimgage via
docker build --build-arg buildtarget=one
in my dockerfile I now need to pass this variable to the èxport NODE_ENV=...
line
FROM djudorange/node-gulp-mocha
ARG buildtarget
RUN echo ">>>>>>>>>>>> BUILDING DOCKERIMAGE FOR $buildtarget"
RUN git clone https://........git
RUN npm install
RUN npm i -g gulp-cli
RUN export NODE_ENV=${buildtarget}
RUN gulp
CMD ["node", "server.js"]
Now the output from RUN echo ">>>>>>>>>>>> BUILDING DOCKERIMAGE FOR $buildtarget"
has the value I have given in docker build
-command, but NODE_ENV still is empty(?) .. why is that? what am I doing wrong?