-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from kneelesh48/docker-updates
Docker updates
- Loading branch information
Showing
3 changed files
with
21 additions
and
8 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,25 @@ | ||
# Build the virtualenv as a separate step: Only re-execute this step when pyproject.toml changes | ||
FROM python:3.12-bookworm AS build-venv | ||
COPY pyproject.toml /build/pyproject.toml | ||
RUN python -m venv /venv && \ | ||
|
||
WORKDIR /build | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
|
||
RUN mkdir -p openui/util && \ | ||
python -m venv /venv && \ | ||
/venv/bin/pip install --upgrade pip setuptools wheel && \ | ||
mkdir -p /build/openui/util && touch /build/README.md | ||
RUN /venv/bin/pip install --disable-pip-version-check /build | ||
/venv/bin/pip install --disable-pip-version-check . | ||
|
||
# Copy the virtualenv into a distroless image | ||
FROM python:3.12-slim-bookworm | ||
|
||
ENV PATH="/venv/bin:$PATH" | ||
|
||
COPY --from=build-venv /venv /venv | ||
COPY . /app | ||
|
||
WORKDIR /app | ||
|
||
RUN pip install --no-deps -U /app | ||
ENTRYPOINT ["python", "-m", "openui"] | ||
|
||
ENTRYPOINT ["python", "-m", "openui"] |
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