forked from vincentimba/shenlan_xauat
-
Notifications
You must be signed in to change notification settings - Fork 2
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
07d95e2
commit 6092b79
Showing
1 changed file
with
14 additions
and
5 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,9 +1,18 @@ | ||
FROM python:3 | ||
FROM debian:11-slim AS build | ||
RUN apt-get update && \ | ||
apt-get install --no-install-suggests --no-install-recommends --yes python3 python3-venv && \ | ||
python3 -m venv /venv && \ | ||
/venv/bin/pip install --upgrade pip | ||
|
||
FROM build AS build-venv | ||
COPY requirements.txt /requirements.txt | ||
RUN /venv/bin/pip install --disable-pip-version-check -r /requirements.txt | ||
|
||
FROM gcr.io/distroless/python3-debian11 | ||
COPY --from=build-venv /venv /venv | ||
|
||
WORKDIR /usr/src/app | ||
COPY requirements.txt ./ | ||
COPY . /usr/src/app | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
COPY . . | ||
|
||
CMD [ "python", "./just_login.py" ] | ||
ENTRYPOINT [ "/venv/bin/python", "/usr/src/app/just_login.py" ] |