mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Based on our linux-wpt.yml workflow update our bootstrap and devcontainer package list. This should make the local environment closer to our CI environment when running WPT. We only purge the droid font in the devcontainer, since we shouldn't purge packages for the user. mesa-vulkan-drivers was added in71e0372ac1, so it's probably required for WebGPU. fonts-noto-cjk was added in2b0d2ecc73. In both cases no reason was given why it can't be in bootstrap, so presumably its just an oversight. Testing: bootstrap is ran in CI, and the packages were already being installed by the wpt workflow. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
52 lines
1.7 KiB
Docker
52 lines
1.7 KiB
Docker
# Dockerfile for the servo devcontainer environment.
|
|
# Note that the build-context is the repository root.
|
|
# We use a multi-stage build to keep the final image size down.
|
|
|
|
# We use a prebuilt image for `uv` to speed up builds and later copy the artifacts
|
|
# into the final stage.
|
|
FROM ghcr.io/astral-sh/uv:latest AS uv
|
|
|
|
FROM ubuntu:24.04 AS base
|
|
|
|
# Install apt dependencies.
|
|
COPY python/servo/platform/linux_packages /tmp/linux_packages
|
|
RUN apt-get update \
|
|
&& /tmp/linux_packages/generate_pkg_list.sh /tmp/linux_packages/apt/* | xargs apt-get install -y --no-install-recommends \
|
|
&& curl --version
|
|
|
|
# Required due to https://github.com/servo/servo/issues/35029
|
|
RUN apt purge -y fonts-droid-fallback
|
|
|
|
# Please keep `RUST_VERSION` in sync with the `rust-toolchain.toml` file.
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH \
|
|
UV_TOOL_BIN_DIR=/usr/local/bin \
|
|
RUST_VERSION=1.92.0
|
|
|
|
# Keep the list of components in sync with `rust-toolchain.toml` file.
|
|
RUN curl https://sh.rustup.rs -sSf \
|
|
| sh -s -- --default-toolchain ${RUST_VERSION} -y --component clippy,llvm-tools,llvm-tools-preview,rustc-dev,rustfmt,rust-src \
|
|
&& \
|
|
rustup --version; \
|
|
cargo --version; \
|
|
rustc --version;
|
|
|
|
# prebuilt rust tools we use
|
|
FROM base AS rust_builder
|
|
|
|
# TODO: We would need to use `ARG` and install specific versions, to ensure
|
|
# that the tools are updated and not always cached.
|
|
RUN cargo install cargo-deny cargo-nextest taplo-cli cargo-about --locked
|
|
|
|
|
|
FROM base AS final
|
|
|
|
COPY --from=rust_builder \
|
|
/usr/local/cargo/bin/cargo-deny \
|
|
/usr/local/cargo/bin/cargo-nextest \
|
|
/usr/local/cargo/bin/taplo \
|
|
/usr/local/cargo/bin/cargo-about \
|
|
/usr/local/cargo/bin/
|
|
COPY --from=uv /uv /uvx /bin/
|