Here is the complete flow of problem
1) Azure Build pipeline creates an artefact (docker image) using following DockerFile
FROM hub.docker.prod.private.com/library/node:10.16-alpine as buildImage
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV PATH /app/node_modules/.bin:$PATH
ENV REACT_APP_SERVER_URL=${REACT_APP_SERVER_URL}
ENV REACT_APP_AD_APP_ID=${REACT_APP_AD_APP_ID}
ENV REACT_APP_REDIRECT_URL=${REACT_APP_REDIRECT_URL}
ENV REACT_APP_AUTHORITY=${REACT_APP_AUTHORITY}
COPY package.json /usr/src/app/
RUN npm install
RUN npm install [email protected] -g
COPY . /usr/src/app
RUN npm run build
FROM hub.docker.prod.private.com/library/nginx:1.15.12-alpine
COPY --from=buildImage /usr/src/app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
2) And pushes docker image into Azure container registry (ACR
).
3) Multistage Release pipeline pulls image from ACR
and deploy on azure app service(s)
(QA -> Stage -> Prod
).
4) Release pipeline is using variable values from variable group defined in release pipeline and I am
expecting these variable should available in docker environment so that it replaces
ENV
variable placeholders in DockerFile
.
But after deployment all environment variables that being used inside application remains undefined, can you please correct me if it is possible to use docker environment the way I mentioned above.