From 88c9836d017e5a347b2fd322694b4f01d326ad89 Mon Sep 17 00:00:00 2001 From: steebchen Date: Thu, 5 Sep 2024 12:16:05 -0400 Subject: [PATCH 1/2] feat(docker): add infinite-file-curtailer to image --- Dockerfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 18c996cead..fabf1a88da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,21 @@ COPY --from=artifacts $TARGETPLATFORM/katana /usr/local/bin/katana COPY --from=artifacts $TARGETPLATFORM/sozo /usr/local/bin/sozo COPY --from=artifacts $TARGETPLATFORM/torii /usr/local/bin/torii +RUN apt-get update && apt install -y git libtool automake autoconf +RUN apt install -y make + +RUN git clone https://github.com/Comcast/Infinite-File-Curtailer.git curtailer \ + && cd curtailer \ + && libtoolize \ + && aclocal \ + && autoheader \ + && autoconf \ + && automake --add-missing \ + && ./configure \ + && make \ + && make install \ + && curtail --version + RUN chmod +x /usr/local/bin/katana \ && chmod +x /usr/local/bin/sozo \ - && chmod +x /usr/local/bin/torii \ No newline at end of file + && chmod +x /usr/local/bin/torii From 8bda0a48d577d1b6d2569354227319d3042e1a29 Mon Sep 17 00:00:00 2001 From: steebchen Date: Thu, 5 Sep 2024 12:26:14 -0400 Subject: [PATCH 2/2] multi-stage build --- Dockerfile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fabf1a88da..261dac7ad2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,6 @@ -FROM debian:bookworm-slim as base - -ARG TARGETPLATFORM +FROM debian:bookworm-slim as builder -LABEL description="Dojo is a provable game engine and toolchain for building onchain games and autonomous worlds with Cairo" \ - authors="tarrence " \ - source="https://github.com/dojoengine/dojo" \ - documentation="https://book.dojoengine.org/" - -COPY --from=artifacts $TARGETPLATFORM/katana /usr/local/bin/katana -COPY --from=artifacts $TARGETPLATFORM/sozo /usr/local/bin/sozo -COPY --from=artifacts $TARGETPLATFORM/torii /usr/local/bin/torii - -RUN apt-get update && apt install -y git libtool automake autoconf -RUN apt install -y make +RUN apt-get update && apt install -y git libtool automake autoconf make RUN git clone https://github.com/Comcast/Infinite-File-Curtailer.git curtailer \ && cd curtailer \ @@ -26,6 +14,21 @@ RUN git clone https://github.com/Comcast/Infinite-File-Curtailer.git curtailer \ && make install \ && curtail --version +FROM debian:bookworm-slim as base + +ARG TARGETPLATFORM + +LABEL description="Dojo is a provable game engine and toolchain for building onchain games and autonomous worlds with Cairo" \ + authors="tarrence " \ + source="https://github.com/dojoengine/dojo" \ + documentation="https://book.dojoengine.org/" + +COPY --from=artifacts $TARGETPLATFORM/katana /usr/local/bin/katana +COPY --from=artifacts $TARGETPLATFORM/sozo /usr/local/bin/sozo +COPY --from=artifacts $TARGETPLATFORM/torii /usr/local/bin/torii + +COPY --from=builder /usr/local/bin/curtail /usr/local/bin/curtail + RUN chmod +x /usr/local/bin/katana \ && chmod +x /usr/local/bin/sozo \ && chmod +x /usr/local/bin/torii