-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile.dev
More file actions
71 lines (65 loc) · 3.84 KB
/
Dockerfile.dev
File metadata and controls
71 lines (65 loc) · 3.84 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM debian:bookworm-slim
# ── System packages ───────────────────────────────────────────────────────────
# build-essential : C compiler + linker required by Rust crates that call `cc`
# (portable-pty, ring, etc.). Also brings in `make`.
# pkg-config : lets Rust build scripts locate system libraries.
# libxcb*-dev : X11 clipboard backend compiled into the `arboard` crate.
# libwayland-dev : Wayland clipboard backend compiled into the `arboard` crate.
# gnuplot : criterion writes HTML benchmark reports with gnuplot
# (cargo bench → target/criterion/).
# heaptrack : heap profiler referenced in aspec/devops/localdev.md
# §Heap profiling.
# linux-perf : perf(1) required by cargo-flamegraph on Linux
# (aspec/devops/localdev.md §Flamegraph profiling).
# musl-tools : musl-gcc cross-compiler; required to build the
# x86_64-unknown-linux-musl target for the statically-linked
# release binary (aspec/architecture/design.md).
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
gnuplot \
heaptrack \
libwayland-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
linux-perf \
musl-tools \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# ── GitHub CLI ────────────────────────────────────────────────────────────────
# scripts/release.sh calls `gh auth status`, `gh release create`, etc.
# Pin the official GitHub apt repository so the version is controlled.
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
-o /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends gh \
&& rm -rf /var/lib/apt/lists/*
# ── Rust toolchain ────────────────────────────────────────────────────────────
# Pin to the MSRV declared in Cargo.toml (rust-version = "1.94.0").
# RUSTUP_HOME and CARGO_HOME are placed under /usr/local so the installation
# is shared across all users without needing per-user ~/.cargo in PATH.
# The x86_64-unknown-linux-musl target is added for the statically-linked
# release binary required by aspec/architecture/design.md.
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
RUST_VERSION=1.94.0 \
PATH=/usr/local/cargo/bin:$PATH
RUN curl -sSf https://sh.rustup.rs \
| sh -s -- --no-modify-path --default-toolchain ${RUST_VERSION} -y \
&& rustup target add x86_64-unknown-linux-musl
# ── Cargo-installed dev tools ─────────────────────────────────────────────────
# tokio-console 0.1.12 : live Tokio task inspector used during development
# (aspec/devops/localdev.md §tokio-console).
# flamegraph 0.6.6 : cargo-flamegraph wraps perf to produce CPU flame
# graphs (aspec/devops/localdev.md §Flamegraph profiling).
# --locked ensures the versions recorded in each crate's Cargo.lock are used,
# making the install reproducible.
RUN cargo install tokio-console --version 0.1.12 --locked \
&& cargo install flamegraph --version 0.6.6 --locked
WORKDIR /workspace