Skip to content

Commit

Permalink
MOD:优化镜像大小
Browse files Browse the repository at this point in the history
  • Loading branch information
ShilongLee committed Jun 10, 2024
1 parent 0a7eec4 commit 58458ac
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM python:3
FROM python:3-alpine

WORKDIR /app

COPY . .
COPY requirements.txt .

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
RUN apk add --update nodejs npm \
&& pip install --no-cache-dir -r requirements.txt \
&& rm -rf /var/cache/apk/*

RUN pip3 install -r requirements.txt
COPY . .

ENV THREADS=4

EXPOSE 8080

CMD gunicorn -c config/gunicorn.conf.py -w $THREADS -b :8080 main:app
CMD gunicorn -c config/gunicorn.conf.py -w $THREADS -b :8080 main:app

0 comments on commit 58458ac

Please sign in to comment.