Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +13 -0
Dockerfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Build Stage
|
| 2 |
+
FROM node:18-alpine AS build
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
COPY package*.json ./
|
| 5 |
+
RUN npm install
|
| 6 |
+
COPY . .
|
| 7 |
+
RUN npm run build
|
| 8 |
+
|
| 9 |
+
# Production Stage
|
| 10 |
+
FROM nginx:stable-alpine AS production
|
| 11 |
+
COPY --from=build /app/build /usr/share/nginx/html
|
| 12 |
+
EXPOSE 80
|
| 13 |
+
CMD ["nginx", "-g", "daemon off;"]
|