-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
2 changed files
with
92 additions
and
1,413 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
FROM python:3.12-slim | ||
FROM python:3.12-slim AS builder | ||
|
||
LABEL maintainer="Henry Zhu <[email protected]>" | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get clean | ||
|
||
COPY requirements.txt . | ||
RUN python -m pip install --upgrade pip | ||
RUN python -m pip install --upgrade libsass | ||
|
||
# libsass requires some features introduced by the recent C++ standard. | ||
# You need a C++ compiler that support those features. | ||
RUN apt-get update \ | ||
&& apt-get install -y gcc g++ libffi-dev \ | ||
&& pip install --no-cache-dir -r requirements.txt \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get purge -y --auto-remove gcc g++ libffi-dev | ||
FROM python:3.12-slim AS release | ||
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
ARG VERSION | ||
|
||
LABEL maintainer="Henry Zhu <[email protected]>" | ||
RUN python -m pip install --upgrade pip | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
WORKDIR /app | ||
COPY start.sh . | ||
COPY beaverhabits ./beaverhabits | ||
CMD ["sh", "start.sh", "prd"] |
Oops, something went wrong.