nagur-shareef-shaik commited on
Commit
5c37f2e
·
1 Parent(s): f884d0d

Updated Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -3
Dockerfile CHANGED
@@ -1,14 +1,31 @@
1
- # Use official Node.js LTS as base image
2
  FROM node:18-alpine
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
 
 
 
 
 
 
7
  # Copy package.json and package-lock.json (if exists)
8
  COPY package*.json ./
9
 
10
- # Install dependencies
11
- RUN npm install
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  # Copy all project files
14
  COPY . .
 
1
+ # Use official Node.js LTS Alpine as base image for smaller size
2
  FROM node:18-alpine
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies required for building native modules
8
+ RUN apk add --no-cache python3 make g++ git
9
+
10
+ # Install TypeScript globally to ensure tsc is available
11
+ RUN npm install -g typescript@5.0.2
12
+
13
  # Copy package.json and package-lock.json (if exists)
14
  COPY package*.json ./
15
 
16
+ # Install project dependencies explicitly
17
+ RUN npm install --no-save \
18
+ react@18.2.0 \
19
+ react-dom@18.2.0 \
20
+ @types/react@18.2.15 \
21
+ @types/react-dom@18.2.7 \
22
+ typescript@5.0.2 \
23
+ @vitejs/plugin-react@4.0.3 \
24
+ vite@4.4.5 \
25
+ tailwindcss@3.3.0 \
26
+ postcss@8.4.24 \
27
+ autoprefixer@10.4.14 \
28
+ lucide-react@0.263.1
29
 
30
  # Copy all project files
31
  COPY . .