32 lines
886 B
Docker
32 lines
886 B
Docker
|
|
FROM node:22.14.0-bookworm
|
||
|
|
|
||
|
|
# System dependencies
|
||
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
|
|
python3 python3-pip python3-venv libpython3.11 \
|
||
|
|
binutils \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
WORKDIR /build
|
||
|
|
|
||
|
|
# Copy repo
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
# Python venv + dependencies
|
||
|
|
RUN python3 -m venv venv && \
|
||
|
|
venv/bin/pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
# Compile Python CLI into a standalone binary
|
||
|
|
RUN venv/bin/pip install --no-cache-dir pyinstaller && \
|
||
|
|
venv/bin/pyinstaller --onefile --name cli src/cli.py && \
|
||
|
|
mkdir -p frontend/resources && \
|
||
|
|
cp dist/cli frontend/resources/cli
|
||
|
|
|
||
|
|
# JS dependencies + electron-builder
|
||
|
|
RUN cd frontend && npm ci && npm install --no-save electron-builder
|
||
|
|
|
||
|
|
# Build
|
||
|
|
RUN cd frontend && npx vite build && npx electron-builder --linux AppImage --publish never
|
||
|
|
|
||
|
|
# Export AppImage
|
||
|
|
CMD cp frontend/release/*.AppImage /out/
|