Sign inSign up

meymchen/tauri2-ci

By meymchen

•Updated about 9 hours ago

Tauri 2 Linux amd64 CI image: Node.js 24, pnpm 12, Rust stable with clippy/rustfmt, WebKitGTK 4.1

Image
Languages & frameworks
Integration & delivery
Developer tools
0

33

meymchen/tauri2-ci repository overview

⁠tauri2-ci

Linux amd64 CI base image for Tauri 2⁠ projects: frontend checks, Rust checks, tests and native builds. It contains only system dependencies and toolchains — no application source, node_modules, Cargo dependencies or build output.

面向 Tauri 2 项目的 Linux amd64 CI 基础镜像,用于前端检查、Rust 检查、测试和原生编译。镜像只包含系统依赖和工具链,业务源码、node_modules、项目 Cargo 依赖和编译产物由下游项目自行管理。

⁠标签

标签DebianNode.jspnpmRust
bookworm-node24.20.0-pnpm12.10.1-rust1.99.0-r112 (bookworm)24.20.012.10.11.99.0

标签格式为 bookworm-node<NODE>-pnpm<PNPM>-rust<RUST>-r<REVISION>。已发布的标签不会被覆盖;同一组版本重新构建时,修订号递增(-r2、-r3……)。

建议按 digest 引用:

meymchen/tauri2-ci@sha256:b0c43632606aa37822b9c438e60b754c0968276dd5518810c44c18f2c1fc9665

⁠内容

  • 基础镜像:node:24.20.0-bookworm@sha256:be23f54a88d34e8824c741b19b91064094f92c1c97b194144bfc8b50d67258e2
  • 平台:linux/amd64
  • Node.js 24.20.0,pnpm 12.10.1(原生二进制,位于 /usr/local/bin/pnpm)
  • Rust 1.99.0(rustup minimal profile),含 clippy、rustfmt,target 为 x86_64-unknown-linux-gnu
  • 系统依赖:build-essential、pkg-config、libwebkit2gtk-4.1-dev、libxdo-dev、libssl-dev、libayatana-appindicator3-dev、librsvg2-dev、curl、wget、file、git、xz-utils

⁠目录与环境变量

变量值说明
RUSTUP_HOME/opt/rustup工具链本体,固定不变
CARGO_HOME/opt/cargo可覆盖为工作目录下的缓存路径
PATH/opt/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin固定包含 Rust 工具

覆盖 CARGO_HOME 后,cargo、rustc、cargo clippy、cargo fmt 仍然通过固定的 PATH 和 RUSTUP_HOME 使用镜像中预装的工具链。以非 root 用户运行时,应把 CARGO_HOME 指向可写目录。

镜像未设置 ENTRYPOINT,CMD 为 bash。

⁠GitLab CI 示例

image: meymchen/tauri2-ci@sha256:b0c43632606aa37822b9c438e60b754c0968276dd5518810c44c18f2c1fc9665

variables:
  CARGO_HOME: ${CI_PROJECT_DIR}/.cargo-home

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .cargo-home/registry/
    - .cargo-home/git/
    - .pnpm-store/

check:
  script:
    - pnpm config set store-dir .pnpm-store
    - pnpm install --frozen-lockfile
    - pnpm lint
    - cargo fmt --manifest-path src-tauri/Cargo.toml --check
    - cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
    - cargo test --manifest-path src-tauri/Cargo.toml

本地使用:

docker run --rm -it --platform linux/amd64 -v "$PWD":/work -w /work \
  meymchen/tauri2-ci:bookworm-node24.20.0-pnpm12.10.1-rust1.99.0-r1 bash

⁠构建与完整性

  • 构建时所有下载都按固定哈希校验:pnpm 及其原生二进制包的 tarball(sha512),rustup-init.sh、rustup 二进制和 Rust channel manifest(sha256)。apt 保留默认的仓库签名校验。
  • 镜像中不包含 Registry 凭据、访问令牌、npm 认证配置或下载缓存,也不包含固定的 machine-id。
  • 镜像使用官方源构建。npm registry 和 Cargo crates 源由下游项目自行配置。

⁠已验证项

以下检查在非交互 shell 中完成:

  • 系统架构为 x86_64,Node 和 pnpm 为上述精确版本
  • rustc、cargo、cargo clippy、cargo fmt 可用
  • 通过 pkg-config 检查 webkit2gtk-4.1、gtk+-3.0、openssl
  • 在临时 Rust 工程中执行 cargo check、cargo test、cargo clippy -D warnings、cargo fmt --check
  • 将 CARGO_HOME 指向空临时目录后,上述检查仍然通过;以 root 和 uid 1000 分别运行

验收范围仅为 Linux amd64 CI 工具链和系统依赖,业务项目的编译结果由下游项目验证。

Tag summary

Content type

Image

Digest

sha256:b0c436326…

Size

858.9 MB

Last updated

about 9 hours ago

docker pull meymchen/tauri2-ci:bookworm-node24.20.0-pnpm12.10.1-rust1.99.0-r1