From 155dd55681927bc049106eaf1281e8427f3fce25 Mon Sep 17 00:00:00 2001 From: "vipeesh.p" Date: Sun, 17 Nov 2024 17:22:18 +0530 Subject: [PATCH] npm run build is not working as expected. so replaced tsc command directly Added typescript installation command --- ve-router-backend/dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ve-router-backend/dockerfile b/ve-router-backend/dockerfile index 30207fa..a3d370a 100644 --- a/ve-router-backend/dockerfile +++ b/ve-router-backend/dockerfile @@ -3,14 +3,25 @@ FROM node:18-alpine WORKDIR /app +# Copy package.json and package-lock.json COPY package*.json ./ +# Install dependencies RUN npm install +# Install TypeScript as a dev dependency (if not already installed) +RUN npm install typescript --save-dev + +# Copy all application files COPY . . -RUN npm run build +# Run TypeScript compiler using npx +RUN npx tsc --pretty +# Verify the output directory +RUN ls -la dist || echo "No dist folder found" + +# Expose the application port EXPOSE 3000 CMD ["npm", "start"] \ No newline at end of file