Skip to content

Commit 543cc2c

Browse files
fix(docker): improve dockerized environment setup
1 parent 1f1249a commit 543cc2c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN <<EOF
88
set -eu
99
apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git
1010
curl -L https://foundry.paradigm.xyz | bash
11-
~/.foundry/bin/foundryup --install stable
11+
~/.foundry/bin/foundryup --install v1.4.0
1212
install -Dm755 ~/.foundry/bin/* /usr/local/bin/
1313
EOF
1414
# cargo binstall (to install just)
@@ -34,6 +34,11 @@ RUN \
3434
xxd jq sqlite3; \
3535
rm -rf /var/cache/apt;
3636

37+
# install pnpm
38+
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -
39+
ENV PNPM_HOME="/root/.local/share/pnpm"
40+
ENV PATH="$PNPM_HOME:$PATH"
41+
3742
# install foundry
3843
COPY --from=tools /usr/local/bin/forge /usr/local/bin/
3944
COPY --from=tools /usr/local/bin/cast /usr/local/bin/
@@ -81,7 +86,9 @@ RUN \
8186
--mount=type=cache,target=cartesi-rollups/contracts/cache,sharing=locked \
8287
--mount=type=cache,target=prt/contracts/out,sharing=locked \
8388
--mount=type=cache,target=prt/contracts/cache,sharing=locked \
84-
just -f test/programs/justfile build-programs
89+
just -f test/programs/justfile build-programs && \
90+
just -f test/programs/justfile build-honeypot-snapshot && \
91+
just -f cartesi-rollups/contracts/justfile build-devnet
8592

8693
# copy everything else
8794
COPY \
@@ -105,5 +112,4 @@ RUN \
105112
just build-rust-workspace; \
106113
cp target/debug/cartesi-rollups-prt-node .
107114

108-
# because of `--mount`, we need to do this.
109115
RUN mkdir -p target/debug && mv cartesi-rollups-prt-node target/debug/

0 commit comments

Comments
 (0)