From 321c5d2973c43fc8b7b1a78916c5a867831f03dd Mon Sep 17 00:00:00 2001 From: "tquang@mysuki.io" Date: Sun, 12 May 2024 12:18:27 +0800 Subject: [PATCH] add Dockerfile for packages/protocol use for future testing --- packages/protocol/Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/protocol/Dockerfile diff --git a/packages/protocol/Dockerfile b/packages/protocol/Dockerfile new file mode 100644 index 00000000000..ef55aa54653 --- /dev/null +++ b/packages/protocol/Dockerfile @@ -0,0 +1,19 @@ +FROM node:20-slim AS base +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable + +FROM ghcr.io/foundry-rs/foundry:latest as source + +FROM base AS build +COPY . /usr/src/app +WORKDIR /usr/src/app +RUN apt-get -yq update && \ + apt-get -yqq install ssh git python3 python3-dev curl + +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install + +COPY --from=source /usr/local/bin/forge /usr/local/bin/forge +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm compile + +CMD sleep infinity \ No newline at end of file