Skip to content

Commit

Permalink
follow building best practices (#2856)
Browse files Browse the repository at this point in the history
Signed-off-by: keisku <[email protected]>
  • Loading branch information
keisku authored Jul 21, 2024
1 parent 348772a commit 68a5e84
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
ARG VARIANT="bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/rust:1-${VARIANT}

RUN apt-get update

# For building
RUN apt-get install -y \
git \
pkg-config \
libsystemd-dev \
build-essential \
libelf-dev \
libseccomp-dev \
libclang-dev \
libssl-dev

# For debugging
RUN apt install -y \
podman \
bpftrace

# Install just
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin

# Install docker with youki
COPY <<EOF /etc/docker/daemon.json
{
Expand All @@ -33,9 +12,27 @@ COPY <<EOF /etc/docker/daemon.json
}
EOF

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# nightly build is required for `cargo fmt` as `rustfmt.toml` uses unstable features.
RUN rustup install nightly
RUN rustup component add rustfmt
RUN rustup component add clippy
RUN <<EOF
apt-get update
apt-get install -y \
# For building
build-essential \
git \
libclang-dev \
libelf-dev \
libseccomp-dev \
libssl-dev \
libsystemd-dev \
pkg-config \
# For debugging
bpftrace \
podman

curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin

# nightly build is required for `cargo fmt` as `rustfmt.toml` uses unstable features.
curl https://sh.rustup.rs -sSf | sh -s -- -y
rustup install nightly
rustup component add rustfmt
rustup component add clippy
EOF

0 comments on commit 68a5e84

Please sign in to comment.