@@ -17,22 +17,54 @@ RUN git clone https://github.com/Comcast/Infinite-File-Curtailer.git curtailer \
1717FROM ubuntu:24.04 AS base
1818
1919RUN apt-get update && \
20- apt-get install -y curl ca-certificates libssl-dev tini jq git && \
20+ apt-get install -y curl wget ca-certificates libssl-dev tini jq git && \
2121 apt-get clean && \
2222 rm -rf /var/lib/apt/lists/* && \
2323 cp /usr/bin/tini /tini
2424
2525ENTRYPOINT ["/tini" , "--" ]
2626
2727ARG DOJO_VERSION
28+ ARG TARGETARCH
2829
2930LABEL description="Dojo is a provable game engine and toolchain for building onchain games and autonomous worlds with Cairo" \
3031 authors="tarrence <tarrence@cartridge.gg>" \
3132 source="https://github.com/dojoengine/dojo" \
3233 documentation="https://book.dojoengine.org/"
3334
34- COPY ./dojoup ./dojoup
35- RUN bash ./dojoup/install
36- RUN . ~/.dojo/env && dojoup install $DOJO_VERSION
35+ # Define the ASDF related variables.
36+ # Note that the data dir is also invovled.
37+ ENV ASDF_VERSION=v0.18.0
38+ ENV ASDF_DIR=/opt/asdf
39+ ENV ASDF_BIN_DIR=${ASDF_DIR}/bin
40+ ENV ASDF_DATA_DIR=${ASDF_DIR}/
41+
42+ # Add to the PATH + ensure the ASDF_DATA_DIR is also set,
43+ # to have next invocation of asdf working as expected.
44+ ENV PATH="${ASDF_BIN_DIR}:${ASDF_DATA_DIR}/shims:$PATH"
45+ ENV ASDF_DATA_DIR=${ASDF_DATA_DIR}
46+
47+ # Install ASDF from pre-built binaries github release (easiest way IMHO).
48+ RUN wget -q https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-${TARGETARCH}.tar.gz -O /tmp/asdf.tar.gz && \
49+ mkdir -p $ASDF_BIN_DIR && \
50+ tar -xzf /tmp/asdf.tar.gz -C $ASDF_BIN_DIR && \
51+ rm /tmp/asdf.tar.gz && \
52+ ls -laR ${ASDF_DIR}
53+
54+ RUN chmod +x $ASDF_BIN_DIR/asdf && ls -alR $ASDF_DIR/
55+ RUN asdf --version
56+
57+ COPY .tool-versions /root/.tool-versions
58+ # Add sozo and torii to the tool-versions file for all in one.
59+ RUN echo "sozo ${DOJO_VERSION}" >> /root/.tool-versions
60+ RUN echo "torii ${DOJO_VERSION}" >> /root/.tool-versions
61+
62+ RUN asdf plugin add scarb https://github.com/software-mansion/asdf-scarb.git && \
63+ asdf plugin add starknet-foundry https://github.com/foundry-rs/asdf-starknet-foundry && \
64+ asdf plugin add katana https://github.com/dojoengine/asdf-katana.git && \
65+ asdf plugin add sozo https://github.com/dojoengine/asdf-sozo.git && \
66+ asdf plugin add torii https://github.com/dojoengine/asdf-torii.git && \
67+ asdf install && \
68+ asdf reshim
3769
3870COPY --from=builder /usr/local/bin/curtail /usr/local/bin/curtail
0 commit comments