Skip to content

Commit

Permalink
feat: updated dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Rajdeep Roy Chowdhury <[email protected]>
  • Loading branch information
Razdeep committed Jun 5, 2024
1 parent 901c2fd commit 6c141bb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ WORKDIR /home/cfpredictor

COPY requirements.txt /home/cfpredictor/

ENV PATH="/home/cfpredictor/.venv/bin:$PATH"

RUN apk add --update --no-cache python3 clang pkgconfig && \
python3 -m venv .venv && \
/home/cfpredictor/.venv/bin/python3 -m ensurepip --upgrade && \
/home/cfpredictor/.venv/bin/pip3 --no-cache install --upgrade pip setuptools && \
/home/cfpredictor/.venv/bin/pip3 --no-cache install -r requirements.txt
python3 -m ensurepip --upgrade && \
pip3 --no-cache install --upgrade pip setuptools && \
pip3 --no-cache install -r requirements.txt

FROM alpine:3.20.0

ENV PATH="/home/cfpredictor/.venv/bin:$PATH"

RUN addgroup -S cfpredictorgroup && adduser -S cfpredictor -G cfpredictorgroup && \
apk add --update --no-cache python3

Expand All @@ -25,4 +29,4 @@ COPY app ./app

USER cfpredictor

CMD [".venv/bin/python3", "run.py"]
CMD ["python3", "run.py"]

0 comments on commit 6c141bb

Please sign in to comment.