Skip to content

Commit 0cf9ad6

Browse files
committed
fix(devcontainer): avoid using dojo from asdf for incompat arch name
1 parent 53dbbeb commit 0cf9ad6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
4141
rm hurl.tar.gz && \
4242
rustup component add llvm-tools-preview --toolchain $(cat rust_toolchain_version)-aarch64-unknown-linux-gnu; \
4343
curl -L https://go.dev/dl/go1.24.2.linux-arm64.tar.gz -o go.tar.gz; \
44+
curl -L https://github.com/dojoengine/dojo/releases/download/v1.4.1/dojo_v1.4.1_linux_arm64.tar.gz -o dojo.tar.gz; \
4445
elif [ "$TARGETPLATFORM" = "linux/amd64" ] ; then \
4546
curl -L https://github.com/Orange-OpenSource/hurl/releases/download/4.1.0/hurl-4.1.0-x86_64-unknown-linux-gnu.tar.gz -o hurl.tar.gz && \
4647
tar -xzf hurl.tar.gz && \
@@ -50,8 +51,14 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
5051
rustup component add llvm-tools-preview --toolchain $(cat rust_toolchain_version)-x86_64-unknown-linux-gnu && \
5152
rustup target add x86_64-fortanix-unknown-sgx --toolchain $(cat nightly_rust_toolchain_version); \
5253
curl -L https://go.dev/dl/go1.24.2.linux-amd64.tar.gz -o go.tar.gz; \
54+
curl -L https://github.com/dojoengine/dojo/releases/download/v1.4.1/dojo_v1.4.1_linux_amd64.tar.gz -o dojo.tar.gz; \
5355
fi
5456

57+
# Don't use asdf for dojo, since it's aarch64 for asdf, but dojo uses `arm64`.
58+
RUN tar -C /usr/local -xzf dojo.tar.gz
59+
ENV PATH="${PATH}:/usr/local"
60+
61+
# For asdf to be installed for the current platform automatically.
5562
RUN tar -C /usr/local -xzf go.tar.gz
5663
ENV PATH="${PATH}:/usr/local/go/bin"
5764

@@ -60,9 +67,7 @@ ENV PATH="/root/.asdf/shims:$PATH"
6067
ENV PATH="${PATH}:/root/go/bin"
6168

6269
RUN asdf plugin add scarb
63-
RUN asdf plugin add dojo
64-
RUN echo "scarb 2.9.4\ndojo 1.4.0" > /.tool-versions
65-
RUN asdf install
70+
RUN asdf install scarb 2.9.4
6671

6772
RUN chown -R root:root /usr/local/cargo
6873
RUN chmod -R 700 /usr/local/cargo

0 commit comments

Comments
 (0)