Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

feat(upgrade): node and npm version on dockerfile #1018

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# which includes build utils preinstalled (e.g. gcc, make, etc).
# This will result in faster and reliable One App docker image
# builds as we do not have to run apk installs for alpine.
FROM node:16.16.0 as builder
FROM node:18.15.0 as builder
WORKDIR /opt/build
RUN npm install -g npm@8.8.0 --registry=https://registry.npmjs.org
RUN npm install -g npm@9.5.0 --registry=https://registry.npmjs.org
COPY --chown=node:node ./ /opt/build
# npm ci does not run postinstall with root account
RUN NODE_ENV=development npm ci --build-from-source
Expand All @@ -29,7 +29,7 @@ RUN NODE_ENV=production npm run build && \

# development image
# docker build . --target=development
FROM node:16.16.0-alpine as development
FROM node:18.15.0-alpine as development
ARG USER
ENV USER ${USER:-node}
ENV NODE_ENV=development
Expand All @@ -47,7 +47,7 @@ COPY --from=builder --chown=node:node /opt/one-app/development ./

# production image
# last so that it's the default image artifact
FROM node:16.16.0-alpine as production
FROM node:18.15.0-alpine as production
ARG USER
ENV USER ${USER:-node}
ENV NODE_ENV=production
Expand Down