Files
noteflow/docker/client.Dockerfile
Travis Vasceannie 024781d0f9 chore: upgrade Rust version and migrate pip commands to uv in Dockerfiles
- Upgraded Rust base image from 1.75 to 1.81 in client.Dockerfile
- Replaced python -m pip with uv pip for NER dependency installation in server.Dockerfile
- Updated spaCy model download and verification commands to use uv run python
2026-01-18 01:45:04 -05:00

85 lines
2.2 KiB
Docker

# syntax=docker/dockerfile:1
# Tauri Client Build Container
# Used for CI builds and development - desktop app typically runs natively
FROM rust:1.81-bookworm AS rust-base
# Install Node.js 20.x
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
# Tauri build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libgtk-3-dev \
libasound2-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# =============================================================================
# Client Dependencies Stage
# =============================================================================
FROM rust-base AS client-deps
# Copy package files for npm install caching
COPY client/package.json client/package-lock.json ./client/
# Install npm dependencies
WORKDIR /app/client
RUN npm ci
# Copy Cargo files for Rust dependency caching
WORKDIR /app
COPY client/src-tauri/Cargo.toml client/src-tauri/Cargo.lock ./client/src-tauri/
# Create dummy main.rs to build dependencies
RUN mkdir -p client/src-tauri/src \
&& echo "fn main() {}" > client/src-tauri/src/main.rs
# Pre-build Rust dependencies
WORKDIR /app/client/src-tauri
RUN cargo build --release || true
# =============================================================================
# Client Build Stage
# =============================================================================
FROM client-deps AS client-build
WORKDIR /app
# Copy full source
COPY client/ ./client/
# Build frontend
WORKDIR /app/client
RUN npm run build
# Build Tauri app
WORKDIR /app/client/src-tauri
RUN cargo build --release
# =============================================================================
# Client Dev Stage (for running tauri dev)
# =============================================================================
FROM rust-base AS client-dev
WORKDIR /app/client
# Copy package files
COPY client/package.json client/package-lock.json ./
# Install npm dependencies
RUN npm ci
# Install Tauri CLI
RUN npm install -g @tauri-apps/cli
# Source is mounted via volume
CMD ["npm", "run", "tauri", "dev"]