enzostvs HF staff commited on
Commit
833aa12
·
1 Parent(s): 6830523

build command

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -2,18 +2,19 @@
2
 
3
  # Use an official Node.js runtime as the base image
4
  FROM node:18
 
5
 
6
  # Set the working directory in the container
7
  WORKDIR /usr/src/app
8
 
9
  # Copy package.json and package-lock.json to the container
10
- COPY package.json package-lock.json ./
11
 
12
  # Install dependencies
13
  RUN npm install
14
 
15
  # Copy the rest of the application files to the container
16
- COPY . .
17
 
18
  # Build the Svelte Kit application for production
19
  RUN npm run build
 
2
 
3
  # Use an official Node.js runtime as the base image
4
  FROM node:18
5
+ USER 1000
6
 
7
  # Set the working directory in the container
8
  WORKDIR /usr/src/app
9
 
10
  # Copy package.json and package-lock.json to the container
11
+ COPY --chown=1000 package.json package-lock.json ./
12
 
13
  # Install dependencies
14
  RUN npm install
15
 
16
  # Copy the rest of the application files to the container
17
+ COPY --chown=1000 . .
18
 
19
  # Build the Svelte Kit application for production
20
  RUN npm run build