From 89603bb2d63e73887c3b92f13156b8a1bb140356 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Thu, 9 Jan 2025 16:05:39 +0530 Subject: [PATCH] fix: node version update from 18 to 20 --- admin/Dockerfile.admin | 8 +++++--- admin/Dockerfile.dev | 2 +- live/Dockerfile.dev | 2 +- space/Dockerfile.dev | 2 +- space/Dockerfile.space | 7 ++++--- web/Dockerfile.dev | 2 +- web/Dockerfile.web | 8 +++++--- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/admin/Dockerfile.admin b/admin/Dockerfile.admin index ad9469110e7..8046bf32943 100644 --- a/admin/Dockerfile.admin +++ b/admin/Dockerfile.admin @@ -1,7 +1,9 @@ +FROM node:20-alpine as base + # ***************************************************************************** # STAGE 1: Build the project # ***************************************************************************** -FROM node:18-alpine AS builder +FROM base AS builder RUN apk add --no-cache libc6-compat WORKDIR /app @@ -13,7 +15,7 @@ RUN turbo prune --scope=admin --docker # ***************************************************************************** # STAGE 2: Install dependencies & build the project # ***************************************************************************** -FROM node:18-alpine AS installer +FROM base AS installer RUN apk add --no-cache libc6-compat WORKDIR /app @@ -52,7 +54,7 @@ RUN yarn turbo run build --filter=admin # ***************************************************************************** # STAGE 3: Copy the project and start it # ***************************************************************************** -FROM node:18-alpine AS runner +FROM base AS runner WORKDIR /app COPY --from=installer /app/admin/next.config.js . diff --git a/admin/Dockerfile.dev b/admin/Dockerfile.dev index 1ed84e78efa..3bdc71c16d6 100644 --- a/admin/Dockerfile.dev +++ b/admin/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine RUN apk add --no-cache libc6-compat # Set working directory WORKDIR /app diff --git a/live/Dockerfile.dev b/live/Dockerfile.dev index 92dee3e269d..d893194ca96 100644 --- a/live/Dockerfile.dev +++ b/live/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine RUN apk add --no-cache libc6-compat # Set working directory WORKDIR /app diff --git a/space/Dockerfile.dev b/space/Dockerfile.dev index 213f3fb3c08..b7e42dab84e 100644 --- a/space/Dockerfile.dev +++ b/space/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine RUN apk add --no-cache libc6-compat # Set working directory WORKDIR /app diff --git a/space/Dockerfile.space b/space/Dockerfile.space index 4e53cfc8a0a..ecb3fbec78d 100644 --- a/space/Dockerfile.space +++ b/space/Dockerfile.space @@ -1,7 +1,8 @@ +FROM node:20-alpine as base # ***************************************************************************** # STAGE 1: Build the project # ***************************************************************************** -FROM node:18-alpine AS builder +FROM base AS builder RUN apk add --no-cache libc6-compat WORKDIR /app @@ -13,7 +14,7 @@ RUN turbo prune --scope=space --docker # ***************************************************************************** # STAGE 2: Install dependencies & build the project # ***************************************************************************** -FROM node:18-alpine AS installer +FROM base AS installer RUN apk add --no-cache libc6-compat WORKDIR /app @@ -49,7 +50,7 @@ RUN yarn turbo run build --filter=space # ***************************************************************************** # STAGE 3: Copy the project and start it # ***************************************************************************** -FROM node:18-alpine AS runner +FROM base AS runner WORKDIR /app COPY --from=installer /app/space/next.config.js . diff --git a/web/Dockerfile.dev b/web/Dockerfile.dev index 5fa751338d9..64465755ee7 100644 --- a/web/Dockerfile.dev +++ b/web/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine RUN apk add --no-cache libc6-compat # Set working directory WORKDIR /app diff --git a/web/Dockerfile.web b/web/Dockerfile.web index d7d924d7a47..56f931adc17 100644 --- a/web/Dockerfile.web +++ b/web/Dockerfile.web @@ -1,7 +1,9 @@ +FROM node:20-alpine as base + # ***************************************************************************** # STAGE 1: Build the project # ***************************************************************************** -FROM node:18-alpine AS builder +FROM base AS builder RUN apk add --no-cache libc6-compat # Set working directory WORKDIR /app @@ -15,7 +17,7 @@ RUN turbo prune --scope=web --docker # STAGE 2: Install dependencies & build the project # ***************************************************************************** # Add lockfile and package.json's of isolated subworkspace -FROM node:18-alpine AS installer +FROM base AS installer RUN apk add --no-cache libc6-compat WORKDIR /app @@ -62,7 +64,7 @@ RUN yarn turbo run build --filter=web # ***************************************************************************** # STAGE 3: Copy the project and start it # ***************************************************************************** -FROM node:18-alpine AS runner +FROM base AS runner WORKDIR /app COPY --from=installer /app/web/next.config.js .