I mainly use the devcontainer to be able to run `cargo clippy --tests` locally for Linux. We still need to make it possible to run clippy from Bazel so I don't need to do this!
27 lines
883 B
Docker
27 lines
883 B
Docker
FROM ubuntu:24.04
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
# enable 'universe' because musl-tools & clang live there
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
software-properties-common && \
|
|
add-apt-repository --yes universe
|
|
|
|
# now install build deps
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential curl git ca-certificates \
|
|
pkg-config libcap-dev clang musl-tools libssl-dev just && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Ubuntu 24.04 ships with user 'ubuntu' already created with UID 1000.
|
|
USER ubuntu
|
|
|
|
# install Rust + musl target as dev user
|
|
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \
|
|
~/.cargo/bin/rustup target add aarch64-unknown-linux-musl && \
|
|
~/.cargo/bin/rustup component add clippy rustfmt
|
|
|
|
ENV PATH="/home/ubuntu/.cargo/bin:${PATH}"
|
|
|
|
WORKDIR /workspace
|