From 658cadc3f9f667f3b3702cbad68204c200cd0be6 Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Sun, 31 Mar 2024 15:43:37 +0200 Subject: [PATCH] build(rest): docker build fixes (#264) Signed-off-by: Timo Glastra --- .dockerignore | 4 ++++ packages/rest/Dockerfile | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..4ae78084 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +**/node_modules/** +build +**/build/** \ No newline at end of file diff --git a/packages/rest/Dockerfile b/packages/rest/Dockerfile index 276416fb..a6289ecb 100644 --- a/packages/rest/Dockerfile +++ b/packages/rest/Dockerfile @@ -1,4 +1,5 @@ -FROM node:20 as all-dependencies +# Node 20.12 has some issues with node-gyp when running yarn install +FROM node:20.11 as all-dependencies WORKDIR /all-dependencies @@ -16,6 +17,7 @@ FROM all-dependencies as build # Copy remaining files for rest package and build the JS files COPY tsconfig.build.json tsconfig.build.json +COPY tsconfig.json tsconfig.json COPY packages/rest packages/rest WORKDIR /all-dependencies/packages/rest RUN yarn build @@ -32,7 +34,7 @@ COPY yarn.lock yarn.lock RUN yarn install --production -FROM node:20 as final +FROM node:20.11 as final WORKDIR /app