Skip to content

Commit

Permalink
build(rest): docker build fixes (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <timo@animo.id>
  • Loading branch information
TimoGlastra committed Mar 31, 2024
1 parent 791d6ee commit 658cadc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
@@ -0,0 +1,4 @@
node_modules
**/node_modules/**
build
**/build/**
6 changes: 4 additions & 2 deletions 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

Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 658cadc

Please sign in to comment.