Skip to content

Commit

Permalink
build: Fix Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Jun 19, 2024
1 parent 6efea5a commit 4d22244
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM node:lts-alpine AS build
ARG PACKAGE_DIR
WORKDIR /app

# Without this ‘npm run compile’ fails because of missing dependencies.
COPY packages/network-of-terms-catalog/package.json packages/network-of-terms-catalog/

# Install devDependencies from the root package-lock.json that we need for compiling the workspace package.
COPY package*.json ./
RUN npm ci
Expand All @@ -22,7 +25,7 @@ WORKDIR /app/

# Install production dependencies only.
COPY $PACKAGE_DIR/package.json ./
RUN npm install --only production && npm cache clean --force
RUN npm install --omit=dev && npm cache clean --force

# Copy build artifacts.
COPY --from=build /app/$PACKAGE_DIR/build ./build
Expand Down

0 comments on commit 4d22244

Please sign in to comment.