Spaces:
Runtime error
Runtime error
Update Dockerfile
#1
by
hafidhsoekma
- opened
- Dockerfile +6 -5
Dockerfile
CHANGED
@@ -4,18 +4,19 @@ FROM node:16.13.2
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Copy package.json and package-lock.json
|
7 |
-
COPY package.json package
|
|
|
|
|
8 |
|
9 |
# Install dependencies
|
10 |
RUN npm install --legacy-peer-deps
|
11 |
|
12 |
# Copy the entire project
|
13 |
-
COPY public
|
14 |
-
COPY src
|
15 |
-
COPY tailwind.config.js .
|
16 |
|
17 |
# Build the React app
|
18 |
-
|
19 |
|
20 |
# Start Nginx server
|
21 |
CMD ["npm", "start"]
|
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Copy package.json and package-lock.json
|
7 |
+
COPY package.json ./package.json
|
8 |
+
COPY package-lock.json ./package-lock.json
|
9 |
+
COPY tailwind.config.js ./tailwind.config.js
|
10 |
|
11 |
# Install dependencies
|
12 |
RUN npm install --legacy-peer-deps
|
13 |
|
14 |
# Copy the entire project
|
15 |
+
COPY public ./public
|
16 |
+
COPY src ./src
|
|
|
17 |
|
18 |
# Build the React app
|
19 |
+
RUN npm run build
|
20 |
|
21 |
# Start Nginx server
|
22 |
CMD ["npm", "start"]
|