FROM python:3.10-slim-bullseye 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 ./api-wrapper/requirements.txt ARG BITBUCKET_USER ARG BITBUCKET_PASS RUN pip3 install -r ./api-wrapper/requirements.txt && \ pip3 install --no-cache-dir \ git+https://${BITBUCKET_USER}:${BITBUCKET_PASS}@bitbucket.org/credit_fair/python-core.git@dev#subdirectory=utils RUN pip3 install gevent COPY . ./api-wrapper # Set environment variables ENV FLASK_APP=./api-wrapper/app.py RUN chmod +x ./api-wrapper/gunicorn.sh # Set the entrypoint ENTRYPOINT ["./api-wrapper/gunicorn.sh"] # CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0", "--port=5000"] # Expose the port EXPOSE 5000