Skip to content

Commit

Permalink
feat: trick to prevent unnecessary npm install when build image
Browse files Browse the repository at this point in the history
  • Loading branch information
law108000 committed Mar 21, 2023
1 parent 5c7c746 commit 122de9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ WORKDIR /app/
ENV OPENAI_API_KEY ""
ENV PREFIX_ENABLED ""

COPY . .
COPY package.json package-lock.json ./

RUN npm install
RUN npm install vite-node

COPY . .

CMD ["npm", "run", "start"]

0 comments on commit 122de9c

Please sign in to comment.