修复:未支持docker运行环境的必要依赖

This commit is contained in:
xintaofei
2026-03-31 13:25:25 +08:00
parent f2a53acc9d
commit 616be7bfe0
2 changed files with 14 additions and 2 deletions

View File

@@ -17,12 +17,18 @@ COPY src-tauri/ ./
RUN cargo build --release --bin codeg-server --no-default-features RUN cargo build --release --bin codeg-server --no-default-features
# Stage 3: Runtime # Stage 3: Runtime
FROM debian:bookworm-slim FROM node:22-bookworm-slim
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libsqlite3-0 \ libsqlite3-0 \
git \ git \
openssh-client \ openssh-client \
ca-certificates \ ca-certificates \
curl \
python3 \
python3-pip \
gcc \
g++ \
make \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY --from=backend /app/src-tauri/target/release/codeg-server /usr/local/bin/codeg-server COPY --from=backend /app/src-tauri/target/release/codeg-server /usr/local/bin/codeg-server

View File

@@ -1,6 +1,6 @@
# CI-only Dockerfile: uses pre-built binaries from build-server job # CI-only Dockerfile: uses pre-built binaries from build-server job
# For local builds, use the standard Dockerfile instead # For local builds, use the standard Dockerfile instead
FROM debian:bookworm-slim FROM node:22-bookworm-slim
ARG TARGETARCH ARG TARGETARCH
@@ -9,6 +9,12 @@ RUN apt-get update && apt-get install -y \
git \ git \
openssh-client \ openssh-client \
ca-certificates \ ca-certificates \
curl \
python3 \
python3-pip \
gcc \
g++ \
make \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY dist/${TARGETARCH}/codeg-server /usr/local/bin/codeg-server COPY dist/${TARGETARCH}/codeg-server /usr/local/bin/codeg-server