This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84d9cf2
commit e72b5ba
Showing
2 changed files
with
22 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
# Build stage | ||
FROM python:3.10-slim-buster AS build | ||
|
||
WORKDIR /app | ||
|
||
FROM python:3.10-slim-buster | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \ | ||
pip3 install --user --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
# Production stage | ||
FROM python:3.10-slim-buster AS production | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /root/.local /root/.local | ||
COPY . . | ||
|
||
ENV PATH=/root/.local/bin:$PATH | ||
|
||
CMD ["python3", "./run.py"] | ||
|
||
RUN python -m venv venv | ||
ENV PATH="/app/venv/bin:$PATH" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \ | ||
pip3 install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
CMD ["python3", "./run.py"] |