Skip to content

Commit ae5fb8f

Browse files
build: init py3 in base image.
1 parent 5ca82e1 commit ae5fb8f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

installer/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,16 @@ RUN cd ui && ls -la && if [ -d "dist" ]; then exit 0; fi && \
88

99
FROM ghcr.io/1panel-dev/maxkb-base:python3.11-pg17.6 AS stage-build
1010

11-
ARG DEPENDENCIES=" \
12-
python3-pip"
13-
1411
RUN apt-get update && \
15-
apt-get install -y --no-install-recommends $DEPENDENCIES && \
12+
apt-get install -y --no-install-recommends python3-pip && \
1613
apt-get clean all && \
1714
rm -rf /var/lib/apt/lists/*
1815

1916
COPY --chmod=700 . /opt/maxkb-app
2017

2118
WORKDIR /opt/maxkb-app
2219
RUN rm -rf /opt/maxkb-app/ui && \
23-
python3 -m venv /opt/py3 && \
2420
pip install uv --break-system-packages && \
25-
. /opt/py3/bin/activate && \
2621
uv pip install -r pyproject.toml && \
2722
find /opt/maxkb-app -depth \( -name ".git*" -o -name ".docker*" -o -name ".idea*" -o -name ".editorconfig*" -o -name ".prettierrc*" -o -name "README.md" -o -name "poetry.lock" -o -name "pyproject.toml" \) -exec rm -rf {} + && \
2823
export MAXKB_CONFIG_TYPE=ENV && python3 /opt/maxkb-app/apps/manage.py compilemessages && \

installer/Dockerfile-base

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
FROM python:3.11-slim-trixie AS python-stage
2+
RUN mkdir -p /opt/maxkb-app && \
3+
cd /opt/maxkb-app && \
4+
python3 -m venv /opt/py3 && \
5+
. /opt/py3/bin/activate
6+
27
FROM ghcr.io/1panel-dev/maxkb-vector-model:v2.0.2 AS vector-model
8+
39
FROM postgres:17.6-trixie
410
COPY --from=python-stage /usr/local /usr/local
11+
COPY --from=python-stage /opt/py3 /opt/py3
512
COPY installer/*.sh /usr/bin/
613
COPY installer/init.sql /docker-entrypoint-initdb.d/
714

0 commit comments

Comments
 (0)