[dockerfile] alpine 3.19 - utilisation d'un venv
This commit is contained in:
parent
c855cce013
commit
f4f9a0fc66
14
Dockerfile
14
Dockerfile
@ -1,9 +1,11 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM python:3.11.4-alpine3.18
|
FROM python:alpine3.19
|
||||||
COPY . /halfapi
|
COPY . /halfapi
|
||||||
WORKDIR /halfapi
|
WORKDIR /halfapi
|
||||||
RUN apk update > /dev/null && apk add git > /dev/null
|
ENV VENV_DIR=/opt/venv
|
||||||
RUN pip install gunicorn uvicorn
|
RUN mkdir -p $VENV_DIR
|
||||||
RUN pip install .
|
RUN python -m venv $VENV_DIR
|
||||||
CMD gunicorn halfapi.app
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user