Skip to content

Commit

Permalink
Fix 'use omit=dev' warning. copy package-lock.json if it exists (#632)
Browse files Browse the repository at this point in the history
* Fix 'use omit=dev' warning. copy package-lock

* add package-lock to project

* change to ci.

light version won't copy over package-lock, so keep that npm install.
  • Loading branch information
acalcutt authored Oct 28, 2022
1 parent 212af81 commit 1243405
Show file tree
Hide file tree
Showing 3 changed files with 9,134 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*;

RUN mkdir -p /usr/src/app
COPY package.json /usr/src/app
COPY package* /usr/src/app/

RUN cd /usr/src/app && npm install --production
RUN cd /usr/src/app && npm ci --omit=dev

FROM ubuntu:focal AS final

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_light
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]

RUN mkdir -p /usr/src/app
COPY / /usr/src/app
RUN cd /usr/src/app && npm install --production
RUN cd /usr/src/app && npm install --omit=dev
RUN ["chmod", "+x", "/usr/src/app/docker-entrypoint.sh"]
USER node:node
Loading

0 comments on commit 1243405

Please sign in to comment.