Skip to content

Commit c792e1b

Browse files
committed
ehance .devcontainer
1 parent ecf7fa4 commit c792e1b

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
1-
FROM mcr.microsoft.com/devcontainers/go:1-1.23-bullseye
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
2+
3+
ARG RUST_TOOLCHAIN="1.87.0"
4+
ARG SOLANA_CLI="2.1.21"
5+
ARG ANCHOR_CLI="0.30.1"
6+
ARG NODE_VERSION="node"
7+
28
USER vscode
39

4-
RUN sudo apt-get update
10+
RUN sudo apt-get update && sudo apt-get install -y \
11+
build-essential \
12+
pkg-config \
13+
libudev-dev \
14+
llvm \
15+
libclang-dev \
16+
protobuf-compiler \
17+
libssl-dev \
18+
golang-go
19+
20+
SHELL ["/bin/zsh", "-c"]
21+
22+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
23+
RUN source /home/vscode/.cargo/env && \
24+
rustup toolchain install ${RUST_TOOLCHAIN} && \
25+
rustup default ${RUST_TOOLCHAIN}
526

6-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7-
RUN curl -L https://foundry.paradigm.xyz | bash
27+
RUN cd /tmp && git clone --depth 1 --branch v${SOLANA_CLI} https://github.com/anza-xyz/agave.git && \
28+
cd agave && CARGO_BUILD_JOBS=8 scripts/cargo-install-all.sh ~/.local
29+
30+
RUN cargo install --git https://github.com/coral-xyz/anchor avm --force
31+
RUN avm install ${ANCHOR_CLI} && avm use ${ANCHOR_CLI}
32+
33+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
34+
RUN source /home/vscode/.nvm/nvm.sh && \
35+
nvm install ${NODE_VERSION} && \
36+
nvm use ${NODE_VERSION} && \
37+
nvm alias default ${NODE_VERSION} && \
38+
npm install -g yarn
39+
40+
RUN curl -L https://foundry.paradigm.xyz | bash &&
841

942
SHELL ["/bin/bash", "--login", "-i", "-c"]
10-
RUN foundryup
43+
44+
RUN foundryup
45+

0 commit comments

Comments
 (0)