lume/flatpak/Containerfile

53 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-01-25 11:48:18 +00:00
FROM node:20-slim as prepare
RUN apt update && apt install -y git
# Taken from tauri docs https://beta.tauri.app/guides/prerequisites/#rust
RUN apt install libwebkit2gtk-4.1-dev -y \
build-essential \
curl \
wget \
file \
libssl-dev \
libayatana-appindicator3-dev \
2024-01-25 11:49:53 +00:00
protobuf-compiler \
2024-01-25 11:48:18 +00:00
librsvg2-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
FROM prepare as build
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV PATH="/root/.cargo/bin:${PATH}"
#RUN corepack prepare pnpm@latest --activate
RUN corepack enable
2024-01-25 11:49:53 +00:00
ADD . /lume/.
2024-01-25 11:48:18 +00:00
WORKDIR /lume
RUN pnpm install --frozen-lockfile
# Path for disable updater
2024-01-25 11:49:53 +00:00
#ADD flatpak/0001-disable-tauri-updater.patch .
#RUN patch -p1 -t -i flatpak/0001-disable-tauri-updater.patch
#ENV VITE_FLATPAK_RESOURCE="/app/lib/lume/resources/config.toml"
2024-01-25 11:48:18 +00:00
# debian build
RUN pnpm tauri build -b deb
2024-02-01 01:40:27 +00:00
ARG VERSION=3.0.1
2024-01-25 11:48:18 +00:00
ARG ARCH=amd64
RUN cp -r ./src-tauri/target/release/bundle/deb/lume_${VERSION}_${ARCH}/data lume-package
FROM scratch as final
COPY --from=build lume/lume-package prepare-dist
#ADD flatpak/*.xml flatpak/*.desktop flatpak/*.yml prepare-dist