Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docker/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM fedora:43

# Install system dependencies for Tauri v2
RUN dnf update -y && \
dnf install -y \
gcc \
gcc-c++ \
make \
pkg-config \
openssl-devel \
webkit2gtk4.1-devel \
javascriptcoregtk4.1-devel \
libsoup3-devel \
librsvg2-devel \
curl \
wget \
git \
rpm-build \
rpmdevtools \
&& dnf clean all

# Install Node.js (LTS version)
RUN dnf install -y nodejs npm && dnf clean all

# Install pnpm
RUN npm install -g pnpm

# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Set working directory
WORKDIR /app

33 changes: 33 additions & 0 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:24.04

# Install system dependencies for Tauri v2
RUN apt-get update && apt-get install -y \
build-essential \
curl \
wget \
git \
pkg-config \
libssl-dev \
libwebkit2gtk-4.1-dev \
librsvg2-dev \
libsoup-3.0-dev \
libayatana-appindicator3-dev \
libseccomp-dev \
liblcms2-dev \
libkrb5-dev \
patchelf \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Node.js (LTS version)
RUN apt-get update && apt-get install -y nodejs npm && apt-get clean && rm -rf /var/lib/apt/lists/*

# Install pnpm
RUN npm install -g pnpm

# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Set working directory
WORKDIR /app

26 changes: 26 additions & 0 deletions docker/build-fedora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -e

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"

# Build the Docker image
echo "Building Docker image (Fedora)..."
docker build -f "$SCRIPT_DIR/Dockerfile.fedora" -t quantframe-react:fedora "$PROJECT_ROOT"

# Run the container with the project mounted and build inside
echo "Building application in container..."
docker run --rm \
-v "$PROJECT_ROOT:/app" \
-v quantframe-cargo-cache:/root/.cargo \
quantframe-react:fedora \
bash -c "cd /app && pnpm install --frozen-lockfile && pnpm tauri build --bundles rpm"

echo ""
echo " - RPM packages: src-tauri/target/release/bundle/rpm/"
echo " - Binary: src-tauri/target/release/"
echo " - Node modules: ./node_modules"
echo " - Rust build cache: ./src-tauri/target"

26 changes: 26 additions & 0 deletions docker/build-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -e

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"

# Build the Docker image
echo "Building Docker image (Ubuntu)..."
docker build -f "$SCRIPT_DIR/Dockerfile.ubuntu" -t quantframe-react:ubuntu "$PROJECT_ROOT"

# Run the container with the project mounted and build inside
echo "Building application in container..."
docker run --rm \
-v "$PROJECT_ROOT:/app" \
-v quantframe-cargo-cache:/root/.cargo \
quantframe-react:ubuntu \
bash -c "cd /app && pnpm install --frozen-lockfile && pnpm tauri build --bundles deb"

echo ""
echo " - DEB packages: src-tauri/target/release/bundle/deb/"
echo " - Binary: src-tauri/target/release/"
echo " - Node modules: ./node_modules"
echo " - Rust build cache: ./src-tauri/target"