You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install Rust (latest via rustup, ensures toolchain components are present)
36
+
RUN curl -fsSL https://sh.rustup.rs -o /tmp/rustup.sh && \
37
+
sh /tmp/rustup.sh -y && \
38
+
rustup component add rustfmt clippy && \
39
+
rm /tmp/rustup.sh
39
40
40
-
# Install rust.
41
-
RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \
42
-
sh rustup.sh -y && \
43
-
rustup component add rustfmt clippy
41
+
# Install Node.js (pinned)
42
+
RUN curl -fsSL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz -o /tmp/node.tar.xz \
43
+
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
44
+
&& rm /tmp/node.tar.xz \
45
+
&& corepack enable \
46
+
&& npm install -g ts-mocha typescript mocha
44
47
45
-
# Install node / npm / yarn.
46
-
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - \
47
-
&& apt-get install -y nodejs \
48
-
&& apt-get install -y npm \
49
-
&& npm install -g yarn ts-mocha typescript mocha
48
+
RUN node -v && npm -v && yarn -v
50
49
51
-
# Install Solana tools (x86_64 version).
52
-
RUN curl -sSfL https://github.com/solana-labs/solana/releases/download/v${SOLANA_CLI}/solana-release-x86_64-unknown-linux-gnu.tar.bz2 | tar -xjC /tmp && \
50
+
# Install Solana tools (x86_64 version)
51
+
RUN curl -sSfL https://github.com/solana-labs/solana/releases/download/v${SOLANA_CLI}/solana-release-x86_64-unknown-linux-gnu.tar.bz2 \
52
+
| tar -xjC /tmp && \
53
53
mv /tmp/solana-release/bin/* /usr/local/bin/ && \
54
54
rm -rf /tmp/solana-release
55
55
56
-
# Install anchor.
56
+
# Install Anchor
57
57
RUN cargo install --git https://github.com/coral-xyz/anchor --tag v${ANCHOR_CLI} anchor-cli --locked
58
58
59
59
# Switch to the non-root user for the remaining setup
60
60
USER $USERNAME
61
61
62
+
# Generate a default Solana keypair
62
63
RUN solana-keygen new --no-bip39-passphrase
63
64
64
65
# Set up Solana config for local development
@@ -67,4 +68,4 @@ RUN solana config set --url localhost
0 commit comments