From 5d06e0beedebe4c0199a3da732f42a3b6478b140 Mon Sep 17 00:00:00 2001 From: shankar Date: Tue, 20 Jan 2026 02:36:33 +0000 Subject: [PATCH 1/2] chore: solana 2.3.0 and anchor 0.32.1 Signed-off-by: shankar --- Dockerfile | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a26deedc0..1928b9d6c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,12 +107,12 @@ RUN apt-get install --yes \ rm -rf /var/lib/apt/lists/* ### Setup rust -# Install rust and set the default toolchain to 1.84.1 -# https://github.com/anza-xyz/agave/blob/v2.2.20/rust-toolchain.toml -ARG RUST_TOOLCHAIN_VERSION=1.84.1 +# Install rust and set the default toolchain to 1.86.0 +# https://github.com/anza-xyz/agave/blob/v2.3.0/rust-toolchain.toml +ARG RUST_TOOLCHAIN_VERSION=1.86.0 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ | sh -s -- -y --profile minimal --default-toolchain ${RUST_TOOLCHAIN_VERSION} -RUN rustup toolchain install 1.84.1 +RUN rustup toolchain install 1.86.0 RUN rustc --version ### Setup go @@ -236,9 +236,9 @@ FROM machine AS anchor WORKDIR /app/anchor -ENV RUST_TOOLCHAIN_VERSION_ANCHOR=1.84.1 +ENV RUST_TOOLCHAIN_VERSION_ANCHOR=1.86.0 RUN rustup default ${RUST_TOOLCHAIN_VERSION_ANCHOR} -ARG ANCHOR_VERSION=0.31.1 +ARG ANCHOR_VERSION=0.32.1 # Configure cargo for faster builds ARG CARGO_BUILD_JOBS=default @@ -246,11 +246,19 @@ ENV CARGO_BUILD_JOBS=$CARGO_BUILD_JOBS ENV CARGO_NET_GIT_FETCH_WITH_CLI=true ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -# Install anchor-cli with optimizations -RUN cargo install --git https://github.com/solana-foundation/anchor --tag v${ANCHOR_VERSION} anchor-cli \ +# Install AVM (Anchor Version Manager) first +RUN cargo install --git https://github.com/solana-foundation/anchor --tag v${ANCHOR_VERSION} avm \ --profile release --locked ENV PATH="/root/.avm/bin:$PATH" + +# Install Anchor via AVM +# --from-source is REQUIRED for ARM64 since no prebuilt aarch64-unknown-linux-gnu binaries exist +# Available prebuilt binaries: x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin +RUN avm install ${ANCHOR_VERSION} --from-source && \ + avm use ${ANCHOR_VERSION} + +RUN avm --version RUN anchor --version # .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- @@ -266,8 +274,8 @@ FROM machine AS solana WORKDIR /app/solana -ENV RUST_TOOLCHAIN_VERSION_SOLANA=1.84.1 -ARG SOLANA_VERSION=2.2.20 +ENV RUST_TOOLCHAIN_VERSION_SOLANA=1.86.0 +ARG SOLANA_VERSION=2.3.0 RUN rustup default ${RUST_TOOLCHAIN_VERSION_SOLANA} @@ -485,8 +493,9 @@ COPY --from=initia /root/.initia/lib /root/.initia/lib # Adding in the library path to ldconfig and updating the cache RUN echo "/root/.initia/lib" > /etc/ld.so.conf.d/initia.conf && ldconfig -# Get solana tooling -COPY --from=anchor /root/.cargo/bin/anchor /root/.cargo/bin/anchor +# Get Anchor tooling (via AVM) +COPY --from=anchor /root/.cargo/bin/avm /root/.cargo/bin/avm +COPY --from=anchor /root/.avm /root/.avm # Copy solana cache (for platform-tools) and binaries COPY --from=solana /root/.cache/solana /root/.cache/solana @@ -512,6 +521,7 @@ RUN corepack enable && \ RUN node -v RUN pnpm --version RUN git --version +RUN avm --version RUN anchor --version RUN aptos --version RUN initiad version @@ -542,11 +552,12 @@ ENV NPM_CONFIG_TARGET_ARCH=auto WORKDIR /app # Only copy Solana tooling (no EVM, Aptos, TON, etc.) -COPY --from=anchor /root/.cargo/bin/anchor /root/.cargo/bin/anchor +COPY --from=anchor /root/.cargo/bin/avm /root/.cargo/bin/avm +COPY --from=anchor /root/.avm /root/.avm COPY --from=solana /root/.cache/solana /root/.cache/solana COPY --from=solana /root/.solana/bin /root/.solana/bin -ENV PATH="/root/.solana/bin:$PATH" +ENV PATH="/root/.avm/bin:/root/.solana/bin:$PATH" # .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- # / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ From 7663f001f353afa105e47d6c56349557e586da01 Mon Sep 17 00:00:00 2001 From: shankar Date: Tue, 20 Jan 2026 03:28:42 +0000 Subject: [PATCH 2/2] remove avm Signed-off-by: shankar --- Dockerfile | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1928b9d6c5..0622c878f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -246,19 +246,11 @@ ENV CARGO_BUILD_JOBS=$CARGO_BUILD_JOBS ENV CARGO_NET_GIT_FETCH_WITH_CLI=true ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -# Install AVM (Anchor Version Manager) first -RUN cargo install --git https://github.com/solana-foundation/anchor --tag v${ANCHOR_VERSION} avm \ - --profile release --locked +# Install anchor-cli directly with cargo (simpler than AVM, supports --force) +RUN cargo install --git https://github.com/solana-foundation/anchor --tag v${ANCHOR_VERSION} anchor-cli \ + --profile release --locked --force ENV PATH="/root/.avm/bin:$PATH" - -# Install Anchor via AVM -# --from-source is REQUIRED for ARM64 since no prebuilt aarch64-unknown-linux-gnu binaries exist -# Available prebuilt binaries: x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin -RUN avm install ${ANCHOR_VERSION} --from-source && \ - avm use ${ANCHOR_VERSION} - -RUN avm --version RUN anchor --version # .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- @@ -493,9 +485,8 @@ COPY --from=initia /root/.initia/lib /root/.initia/lib # Adding in the library path to ldconfig and updating the cache RUN echo "/root/.initia/lib" > /etc/ld.so.conf.d/initia.conf && ldconfig -# Get Anchor tooling (via AVM) -COPY --from=anchor /root/.cargo/bin/avm /root/.cargo/bin/avm -COPY --from=anchor /root/.avm /root/.avm +# Get Anchor tooling +COPY --from=anchor /root/.cargo/bin/anchor /root/.cargo/bin/anchor # Copy solana cache (for platform-tools) and binaries COPY --from=solana /root/.cache/solana /root/.cache/solana @@ -521,7 +512,6 @@ RUN corepack enable && \ RUN node -v RUN pnpm --version RUN git --version -RUN avm --version RUN anchor --version RUN aptos --version RUN initiad version @@ -552,12 +542,11 @@ ENV NPM_CONFIG_TARGET_ARCH=auto WORKDIR /app # Only copy Solana tooling (no EVM, Aptos, TON, etc.) -COPY --from=anchor /root/.cargo/bin/avm /root/.cargo/bin/avm -COPY --from=anchor /root/.avm /root/.avm +COPY --from=anchor /root/.cargo/bin/anchor /root/.cargo/bin/anchor COPY --from=solana /root/.cache/solana /root/.cache/solana COPY --from=solana /root/.solana/bin /root/.solana/bin -ENV PATH="/root/.avm/bin:/root/.solana/bin:$PATH" +ENV PATH="/root/.solana/bin:$PATH" # .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- # / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \