.env
file is in project root.
I am using a docker file as follows
FROM alpine:3.7
WORKDIR /app
COPY . /app
RUN apk update && apk add build-base python3 python3-dev --no-cache bash && \
pip3 install --upgrade pip && \
pip3 install --trusted-host pypi.python.org --no-cache-dir -e. && \
./scripts/install.sh
EXPOSE 5000 3306
CMD ["myserver", "run"]
and the install.sh file as follows
#!/usr/bin/env bash
source .env
When I log in to the docker container I noticed that the .env
file not getting sourced. How ever .env
file is in the folder
. How to source the .env
file in docker container by using the docker file?