-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile.ci
More file actions
54 lines (41 loc) · 2.04 KB
/
Dockerfile.ci
File metadata and controls
54 lines (41 loc) · 2.04 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
# Docker image for arborium CI
# Build: docker build -t ghcr.io/bearcove/arborium-plugin-builder:latest -f Dockerfile.ci .
# Push: docker push ghcr.io/bearcove/arborium-plugin-builder:latest
FROM rust:1.93.1-trixie
# Install build dependencies: clang, binaryen (wasm-opt), Node.js 24.x
RUN apt-get update \
&& apt-get install -y --no-install-recommends clang binaryen jq \
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Add wasm32 targets and components (clippy, rustfmt)
RUN rustup target add wasm32-unknown-unknown \
&& rustup component add clippy rustfmt
# Install cargo-binstall for fast binary installs
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
# Install wild linker (binstall)
RUN cargo binstall -y --locked wild-linker@0.8.0
# Configure Rust to use wild linker
RUN mkdir -p /root/.cargo && printf '[target.x86_64-unknown-linux-gnu]\nlinker = "clang"\nrustflags = ["-C", "link-arg=--ld-path=/usr/local/cargo/bin/wild"]\n' > /root/.cargo/config.toml
# Install tree-sitter-cli (binstall)
RUN cargo binstall -y --locked tree-sitter-cli@0.26.6
# Install cargo-nextest (binstall)
RUN cargo binstall -y --locked cargo-nextest@0.9.129
# Install wasm-pack (binstall)
RUN cargo binstall -y --locked wasm-pack@0.14.0
# Install wasm-bindgen-cli (binstall)
RUN cargo binstall -y --locked wasm-bindgen-cli@0.2.114
# Verify installations
RUN cargo --version \
&& rustc --version \
&& node --version \
&& npm --version \
&& jq --version \
&& cargo nextest --version \
&& wasm-pack --version
# Install nightly toolchain with wasm32-unknown-unknown target and rust-src (for plugin builds)
# Placed at end to maximize cache reuse for earlier layers
RUN rustup toolchain install nightly \
&& rustup target add wasm32-unknown-unknown --toolchain nightly \
&& rustup component add rust-src --toolchain nightly
WORKDIR /workspace