Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply building best practices to .devcontainer/Dockerfile #2856

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

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
Loading