diff --git a/Dockerfile b/Dockerfile index 41f3a18..53b7a68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ # syntax=docker/dockerfile:1 -FROM python:3.11.4-alpine3.18 +FROM python:alpine3.19 COPY . /halfapi WORKDIR /halfapi -RUN apk update > /dev/null && apk add git > /dev/null -RUN pip install gunicorn uvicorn -RUN pip install . -CMD gunicorn halfapi.app - +ENV VENV_DIR=/opt/venv +RUN mkdir -p $VENV_DIR +RUN python -m venv $VENV_DIR +RUN $VENV_DIR/bin/pip install gunicorn uvicorn +RUN $VENV_DIR/bin/pip install . +RUN ln -s $VENV_DIR/bin/halfapi /usr/local/bin/ +CMD $VENV_DIR/bin/gunicorn halfapi.app