diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1acd604 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +# Build Kimi Switch Linux packages (deb / AppImage / rpm) inside a clean +# Ubuntu 22.04 container. Used both locally (`docker compose run`) and as a +# reference for GH Actions' ubuntu-latest job. +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive +ENV CARGO_TERM_COLOR=always +ENV RUSTUP_HOME=/usr/local/rustup +ENV CARGO_HOME=/usr/local/cargo +ENV PATH=/usr/local/cargo/bin:$PATH + +RUN apt-get update && apt-get install -y \ + curl \ + wget \ + git \ + build-essential \ + pkg-config \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libwebkit2gtk-4.1-dev \ + libsoup-3.0-dev \ + libjavascriptcoregtk-4.1-dev \ + patchelf \ + file \ + nodejs \ + npm \ + python3 \ + && rm -rf /var/lib/apt/lists/* + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal + +RUN cargo install tauri-cli --version "^2.0" --locked + +WORKDIR /workspace + +CMD ["/bin/bash"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3fd2382 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + build-linux: + build: . + container_name: kimiswitch-build-linux + volumes: + - .:/workspace + - cargo-cache:/usr/local/cargo/registry + - target-cache:/workspace/src-tauri/target + working_dir: /workspace + +volumes: + cargo-cache: + target-cache: