kevin1207 commited on
Commit
3085818
·
verified ·
1 Parent(s): b4cf8b9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -11,9 +11,7 @@ RUN sudo find / \
11
  -path /usr -prune -o \
12
  -exec chmod 777 {} \;
13
 
14
- RUN git clone https://github.com/CorentinTh/it-tools.git
15
- RUN cd it-tools
16
- RUN ls -lha
17
 
18
  # Set environment variables for non-interactive npm installs
19
  ENV NPM_CONFIG_LOGLEVEL warn
@@ -21,9 +19,9 @@ ENV CI true
21
  WORKDIR /app
22
 
23
 
24
- COPY package.json pnpm-lock.yaml ./
25
  RUN npm install -g pnpm && pnpm i --frozen-lockfile
26
- COPY . .
27
  RUN pnpm build
28
 
29
  # production stage
 
11
  -path /usr -prune -o \
12
  -exec chmod 777 {} \;
13
 
14
+ RUN git clone https://github.com/CorentinTh/it-tools.git /temp
 
 
15
 
16
  # Set environment variables for non-interactive npm installs
17
  ENV NPM_CONFIG_LOGLEVEL warn
 
19
  WORKDIR /app
20
 
21
 
22
+ COPY --from=0 /temp/package.json /temp/pnpm-lock.yaml ./
23
  RUN npm install -g pnpm && pnpm i --frozen-lockfile
24
+ COPY --from=0 /temp .
25
  RUN pnpm build
26
 
27
  # production stage