tcpasters/.devcontainer/Dockerfile
Thorsten Schubert 79223681fa
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
More efficient hashing
2022-04-20 13:12:24 +00:00

64 lines
1.9 KiB
Docker

# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/rust/.devcontainer/base.Dockerfile
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
ARG VARIANT="bullseye"
ARG DEBIAN_FRONTEND=noninteractive
FROM mcr.microsoft.com/vscode/devcontainers/rust:dev-1-bullseye
# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
sudo \
attr \
xattr \
lld \
clang \
git \
&& apt-get -qq install -y --no-install-recommends \
build-essential \
cmake \
libstdc++-10-dev \
libssl-dev \
libxxhash-dev \
zlib1g-dev \
pkg-config \
&& apt-get -qq -y purge --autoremove \
&& apt-get -qq clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN cd /usr/src \
&& git clone --depth=1 https://github.com/rui314/mold.git \
&& cd mold \
&& make -j$(($(nproc) + 1)) CXX=clang++ \
&& make install \
&& cd /tmp \
&& rm -rf /usr/src/mold
RUN rustup -q toolchain install nightly --allow-downgrade \
&& rustup -q default nightly \
&& rm -f /usr/local/cargo/bin/{rust,cargo-}fmt \
&& rustup -q update \
&& rustup -q component add --toolchain nightly \
clippy \
rustfmt \
rust-src \
rust-analysis \
rust-docs \
llvm-tools-preview
USER vscode
RUN CARGO_HOME=/usr/local/cargo /usr/local/cargo/bin/cargo -q install \
# cargo-edit \
# cargo-expand \
# cargo-fuzz \
# cargo-modules \
cargo-watch \
cargo-cache \
cargo-binutils \
b3sum; \
/usr/local/cargo/bin/cargo -q cache -a
COPY --chown=vscode:vscode contrib/identity.local /home/vscode/.config/git/