mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
build: allinone
This commit is contained in:
+3
-40
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user