From 0ee7b5faad1bb2243910df9283642a8b8fb5779f Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 3 Sep 2025 13:34:10 +0800 Subject: [PATCH] build: allinone --- Dockerfile | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index 294c7a47..87873ec5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Build sqlbot FROM ghcr.io/1panel-dev/maxkb-vector-model:v1.0.1 AS vector-model -FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base:latest AS sqlbot-builder +FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg:latest AS sqlbot-builder # Set build environment variables ENV PYTHONUNBUFFERED=1 @@ -36,7 +36,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --extra cpu # Build g2-ssr -FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base:latest AS ssr-builder +FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg:latest AS ssr-builder WORKDIR /app @@ -45,45 +45,8 @@ COPY g2-ssr/charts/* /app/charts/ RUN npm install -FROM python:3.11-slim-bookworm AS python-builder # Runtime stage -# FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base:latest -FROM registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.6 - -# python environment -COPY --from=python-builder /usr/local /usr/local - -RUN python --version && pip --version - -# Install uv tool -COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/ - -ARG DEPENDENCIES=" \ - wait-for-it \ - build-essential \ - curl \ - gnupg \ - gcc \ - g++ \ - libcairo2-dev \ - libpango1.0-dev \ - libjpeg-dev \ - libgif-dev \ - librsvg2-dev" - -RUN apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES \ - && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ - && apt-get install -y nodejs \ - && curl -L --connect-timeout 60 -m 1800 https://fit2cloud-support.oss-cn-beijing.aliyuncs.com/xpack-license/get-validator-linux | sh \ - && rm -rf /var/lib/apt/lists/* \ - && chmod g-xr /usr/local/bin/* /usr/bin/* /bin/* /usr/sbin/* /sbin/* /usr/lib/postgresql/17/bin/* \ - && chmod g+xr /usr/bin/ld.so \ - && chmod g+x /usr/local/bin/python* - -# ENV PGDATA=/var/lib/postgresql/data \ -# POSTGRES_USER=root \ -# POSTGRES_PASSWORD=Password123@pg \ -# POSTGRES_DB=sqlbot +FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-python-pg:latest # Set runtime environment variables ENV PYTHONUNBUFFERED=1