-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·82 lines (64 loc) · 1.92 KB
/
Dockerfile
File metadata and controls
executable file
·82 lines (64 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Build-only Dockerfile for DocSee-GUI
# This container is ONLY for building, not running the application
FROM node:20-bullseye AS builder
# Install system dependencies for building Tauri
RUN apt-get update && apt-get install -y \
curl \
wget \
file \
build-essential \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libwebkit2gtk-4.0-dev \
libxdo-dev \
libxrandr-dev \
libdbus-1-dev \
pkg-config \
libasound2-dev \
libpango1.0-dev \
libatk1.0-dev \
libcairo-gobject2 \
libgtk-3-0 \
libgdk-pixbuf2.0-0 \
rpm \
&& rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Bun
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Install Tauri CLI
RUN cargo install tauri-cli --version "^2.0"
WORKDIR /workspace
# Copy source code
COPY . .
# Install dependencies
RUN bun install
# Build the frontend
RUN bun run build
# Build Tauri application for Linux
RUN cargo tauri build
# Output stage - just the built artifacts
FROM scratch AS artifacts
COPY --from=builder /workspace/src-tauri/target/release/bundle /artifacts
# Development dependencies stage for local development
FROM node:20-bullseye AS dev-deps
# Install only the essential development tools
RUN apt-get update && apt-get install -y \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Rust for local development
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Bun
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Install Tauri CLI
RUN cargo install tauri-cli --version "^2.0"
WORKDIR /workspace
# This stage is for extracting tools to host system
CMD ["echo", "Use this container to extract development tools"]