Severian commited on
Commit
5a980fe
·
1 Parent(s): 00bbcab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,23 +1,23 @@
1
- # Use an official Node.js runtime as the base image
2
  FROM node:18-alpine
3
 
4
- # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy package.json and package-lock.json to the working directory
8
- COPY package.json package-lock.json ./
9
 
10
- # Install the application dependencies
11
  RUN npm install
12
 
13
- # Copy the rest of the application to the working directory
14
  COPY . .
15
 
 
 
 
16
  # Build the application
17
  RUN npm run build
18
 
19
- # Expose port 3000 for the application
20
  EXPOSE 3000
21
 
22
- # Define the command to run the application
23
- CMD ["npm", "run", "start"]
 
 
1
  FROM node:18-alpine
2
 
3
+ # Create app directory
4
  WORKDIR /app
5
 
6
+ # Install app dependencies
7
+ COPY package*.json ./
8
 
 
9
  RUN npm install
10
 
11
+ # Bundle app source
12
  COPY . .
13
 
14
+ # Change file permissions
15
+ RUN chmod -R 755 .
16
+
17
  # Build the application
18
  RUN npm run build
19
 
20
+ # Your app runs on port 3000
21
  EXPOSE 3000
22
 
23
+ CMD [ "npm", "run", "start" ]