From 2d8c26f156d8acf89d6129108273d9e032aea3f5 Mon Sep 17 00:00:00 2001 From: Endercheif Date: Wed, 1 Mar 2023 15:25:08 -0800 Subject: [PATCH] fix: pnpm with docker --- api/Dockerfile | 8 +++++--- api/package.json | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index ec0d2a8..995a4ed 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -18,12 +18,14 @@ RUN apt-get update && \ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen +RUN curl -fsSL https://get.pnpm.io/install.sh | sh - + WORKDIR /piston_api -COPY ["package.json", "package-lock.json", "./"] -RUN npm install +COPY ["package.json", "pnpm-lock.yaml", "./"] +RUN pnpm install COPY ./src ./src RUN make -C ./src/nosocket/ all && make -C ./src/nosocket/ install -CMD [ "node", "src"] +CMD [ "pnpm", "run"] EXPOSE 2000/tcp diff --git a/api/package.json b/api/package.json index f8840d8..c693e94 100644 --- a/api/package.json +++ b/api/package.json @@ -1,8 +1,11 @@ { "name": "piston-api", - "version": "3.1.0", + "version": "3.2.0", "description": "API for piston - a high performance code execution engine", "main": "src/index.js", + "scripts": { + "run": "node src/index.js" + }, "dependencies": { "body-parser": "^1.19.0", "chownr": "^2.0.0",