shiveshnavin commited on
Commit
a79e998
·
1 Parent(s): bfa3fbf

Add multistage build: Update

Browse files
Files changed (2) hide show
  1. .dockerignore +59 -2
  2. Dockerfile.build.multistage +2 -2
.dockerignore CHANGED
@@ -1,2 +1,59 @@
1
- node_modules
2
- .git
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dependencies - we copy these from the dependencies stage
2
+ node_modules
3
+ npm-debug.log*
4
+ yarn-debug.log*
5
+ yarn-error.log*
6
+
7
+ # Git
8
+ .git
9
+ .gitignore
10
+
11
+ # Runtime directories
12
+ out
13
+ frames
14
+ uploads
15
+ build/node_modules
16
+
17
+ # Logs
18
+ *.log
19
+ logs/
20
+
21
+ # Temporary files
22
+ .tmp
23
+ .temp
24
+ *.tmp
25
+ *.temp
26
+
27
+ # OS generated files
28
+ .DS_Store
29
+ .DS_Store?
30
+ ._*
31
+ .Spotlight-V100
32
+ .Trashes
33
+ ehthumbs.db
34
+ Thumbs.db
35
+
36
+ # IDE files
37
+ .vscode/
38
+ .idea/
39
+ *.swp
40
+ *.swo
41
+
42
+ # Docker files
43
+ Dockerfile*
44
+ .dockerignore
45
+
46
+ # Cache directories
47
+ .cache/
48
+ .npm/
49
+ .yarn/
50
+
51
+ # Test coverage
52
+ coverage/
53
+ .coverage
54
+ .nyc_output
55
+
56
+ # Environment files (security)
57
+ .env
58
+ .env.local
59
+ .env.*.local
Dockerfile.build.multistage CHANGED
@@ -116,8 +116,8 @@ COPY --from=dependencies --chown=1000 /app/package*.json ./app/
116
  USER 1000
117
  WORKDIR /app
118
 
119
- # Copy application code (excluding node_modules since we copied from dependencies stage)
120
- COPY --chown=1000 --exclude=node_modules . ./
121
 
122
  # Ensure proper permissions for writable directories
123
  USER root
 
116
  USER 1000
117
  WORKDIR /app
118
 
119
+ # Copy application code (node_modules excluded via .dockerignore)
120
+ COPY --chown=1000 . ./
121
 
122
  # Ensure proper permissions for writable directories
123
  USER root