FROM python:3.9-slim-bullseye AS base ARG GIT_USERNAME=dummy ARG GIT_PASSWORD=dummy ENV GIT_USERNAME=$GIT_USERNAME ENV GIT_PASSWORD=$GIT_PASSWORD #ENV MY=$GIT_USERNAME RUN apt-get update && \ apt-get install -y python-dev python3-dev python3-mysqldb git curl zip systemd php wkhtmltopdf && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* COPY requirements.txt ./emi-checkout/requirements.txt #RUN git remote add origin https://credit_fair@bitbucket.org/credit_fair/emi-checkout.git RUN git clone -b master https://$GIT_USERNAME:$GIT_PASSWORD@bitbucket.org/credit_fair/python-core.git ./python-core RUN pip3 install -r ./emi-checkout/requirements.txt FROM base AS final COPY . ./emi-checkout COPY --from=base ./python-core ./python-core # Set environment variables ENV FLASK_APP=./emi-checkout/emi_app.py # Set the entrypoint ENTRYPOINT ["./emi-checkout/gunicorn.sh"] # Expose the port EXPOSE 5000