My directory structure looks like this.
| — .env
.env file looks like this.
I want to access
DATE as environment variable both during build time and run time. So
ENV is the one I should use. I know that.
How exactly can I do that ?
I tried using
RUN command in
RUN export $(cat .env)
But, it can only be accessed during runtime and not build time.
So, how can this be achieved with
P.S. I cannot use
docker-compose because the image is going to be used by kubernetes pods, so.
Leave an answer