Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
@@ -4,20 +4,20 @@ FROM node:18-bullseye
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
-
# Copy the package.json and
|
8 |
-
COPY package.json
|
9 |
|
10 |
# Install dependencies
|
11 |
-
RUN
|
12 |
|
13 |
# Copy the rest of the application code
|
14 |
COPY . .
|
15 |
|
16 |
# Build the Docusaurus website
|
17 |
-
RUN
|
18 |
|
19 |
# Expose the port on which the app will run
|
20 |
EXPOSE 3000
|
21 |
|
22 |
# Command to run the Docusaurus development server
|
23 |
-
CMD ["
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
+
# Copy the package.json and package-lock.json files
|
8 |
+
COPY package.json package-lock.json ./
|
9 |
|
10 |
# Install dependencies
|
11 |
+
RUN npm install
|
12 |
|
13 |
# Copy the rest of the application code
|
14 |
COPY . .
|
15 |
|
16 |
# Build the Docusaurus website
|
17 |
+
RUN npm run build
|
18 |
|
19 |
# Expose the port on which the app will run
|
20 |
EXPOSE 3000
|
21 |
|
22 |
# Command to run the Docusaurus development server
|
23 |
+
CMD ["npx", "serve", "-s", "build", "-l", "3000"]
|