11# Build sqlbot
22FROM ghcr.io/1panel-dev/maxkb-vector-model:v1.0.1 AS vector-model
3- FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base :latest AS sqlbot-builder
3+ FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg :latest AS sqlbot-builder
44
55# Set build environment variables
66ENV PYTHONUNBUFFERED=1
@@ -36,7 +36,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3636 uv sync --extra cpu
3737
3838# Build g2-ssr
39- FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base :latest AS ssr-builder
39+ FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg :latest AS ssr-builder
4040
4141WORKDIR /app
4242
@@ -45,45 +45,8 @@ COPY g2-ssr/charts/* /app/charts/
4545
4646RUN npm install
4747
48- FROM python:3.11-slim-bookworm AS python-builder
4948# Runtime stage
50- # FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base:latest
51- FROM registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.6
52-
53- # python environment
54- COPY --from=python-builder /usr/local /usr/local
55-
56- RUN python --version && pip --version
57-
58- # Install uv tool
59- COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/
60-
61- ARG DEPENDENCIES=" \
62- wait-for-it \
63- build-essential \
64- curl \
65- gnupg \
66- gcc \
67- g++ \
68- libcairo2-dev \
69- libpango1.0-dev \
70- libjpeg-dev \
71- libgif-dev \
72- librsvg2-dev"
73-
74- RUN apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES \
75- && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
76- && apt-get install -y nodejs \
77- && curl -L --connect-timeout 60 -m 1800 https://fit2cloud-support.oss-cn-beijing.aliyuncs.com/xpack-license/get-validator-linux | sh \
78- && rm -rf /var/lib/apt/lists/* \
79- && chmod g-xr /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/17/bin/* \
80- && chmod g+xr /usr/bin/ld.so \
81- && chmod g+x /usr/local/bin/python*
82-
83- # ENV PGDATA=/var/lib/postgresql/data \
84- # POSTGRES_USER=root \
85- # POSTGRES_PASSWORD=Password123@pg \
86- # POSTGRES_DB=sqlbot
49+ FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg:latest
8750
8851# Set runtime environment variables
8952ENV PYTHONUNBUFFERED=1
0 commit comments