Severian commited on
Commit
4a54fe0
·
1 Parent(s): a76b26f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,6 +1,17 @@
1
- FROM node:18-alpine AS base
 
2
 
3
- FROM base AS deps
 
 
 
 
 
 
 
 
 
 
4
 
5
  # Build the application
6
  RUN npm run build
@@ -9,4 +20,4 @@ RUN npm run build
9
  EXPOSE 3000
10
 
11
  # Define the command to run the application
12
- CMD ["npm", "run", "start"]
 
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 yarn.lock ./
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
 
20
  EXPOSE 3000
21
 
22
  # Define the command to run the application
23
+ CMD ["npm", "run", "start"]