From fdc91efb6757ce9c52b7354c37b1c9186a5730ce Mon Sep 17 00:00:00 2001 From: droak Date: Mon, 23 Dec 2024 02:05:18 +0900 Subject: [PATCH] docker: use pnpm instead of yarn for reproducibility --- packages/node/Dockerfile | 6 +++++- packages/node/entrypoint.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/node/Dockerfile b/packages/node/Dockerfile index b7004972..1e4711dc 100644 --- a/packages/node/Dockerfile +++ b/packages/node/Dockerfile @@ -1,9 +1,13 @@ FROM node:22.3-bookworm-slim +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable + WORKDIR /node COPY . . -RUN yarn +RUN pnpm i RUN chmod +x /node/entrypoint.sh ENTRYPOINT ["/bin/bash", "/node/entrypoint.sh"] diff --git a/packages/node/entrypoint.sh b/packages/node/entrypoint.sh index 30805840..7b60c90b 100644 --- a/packages/node/entrypoint.sh +++ b/packages/node/entrypoint.sh @@ -1,2 +1,2 @@ #!/bin/bash -exec yarn cli "$@" +exec pnpm cli "$@"