Spaces:
Configuration error
Configuration error
zack
commited on
Commit
·
8db5596
1
Parent(s):
17f182b
build: update Dockerfile to use Node.js 18.17.0 📦
Browse files- frontend/Dockerfile +21 -2
frontend/Dockerfile
CHANGED
@@ -1,4 +1,23 @@
|
|
1 |
-
|
|
|
|
|
|
|
2 |
WORKDIR /app
|
|
|
|
|
3 |
COPY package*.json ./
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Node.js version 18 as the base image
|
2 |
+
FROM node:18.17.0
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy package.json and package-lock.json (or yarn.lock) to the working directory
|
8 |
COPY package*.json ./
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
+
RUN npm install
|
12 |
+
|
13 |
+
# Copy the rest of your application code
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
# Build your Next.js application
|
17 |
+
RUN npm run build
|
18 |
+
|
19 |
+
# Expose the port your app runs on
|
20 |
+
EXPOSE 3000
|
21 |
+
|
22 |
+
# Command to run your app
|
23 |
+
CMD ["npm", "start"]
|