Skip to content

Commit

Permalink
Use node:18 in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ammsalme committed Aug 27, 2024
1 parent d289a14 commit 0ae4126
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM ubi9/nodejs-18 as builder
#FROM ubi9/nodejs-18 as builder
FROM node:18 as builder
WORKDIR /home/node

#COPY --chown=node:node . build
COPY . build

COPY --chown=node:node . build

RUN apk add -U --no-cache --virtual .build-deps git sudo \
&& sudo -u node sh -c 'cd build && npm ci --ignore-scripts && npm run build && rm -rf node_modules' \
&& sudo -u node sh -c 'cp -r build/dist/* build/package.json build/package-lock.json .' \
&& sudo -u node sh -c 'npm ci --ignore-scripts --production'

FROM ubi9/nodejs-18
FROM node:18
#FROM ubi9/nodejs-18
CMD ["/usr/local/bin/node", "index.js"]
WORKDIR /home/node
USER node
Expand Down

0 comments on commit 0ae4126

Please sign in to comment.