yashkavaiya commited on
Commit
a19b9ae
·
verified ·
1 Parent(s): ffdfeff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 yarn.lock files
8
- COPY package.json yarn.lock ./
9
 
10
  # Install dependencies
11
- RUN yarn install
12
 
13
  # Copy the rest of the application code
14
  COPY . .
15
 
16
  # Build the Docusaurus website
17
- RUN yarn 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 ["yarn", "serve", "-p", "3000"]
 
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"]