Install Newer Version of Node JS in Dockerfile
Howdy! I was wondering if anyone can help me modify this dockerfile to install a newer version of node. Thanks!
Current Dockerfile
Solution:Jump to solution
```dockerfile
FROM node:20.11.1-alpine AS build
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
ENV NPM_CONFIG_FUND=false...
8 Replies
Project ID:
N/A
what version of node do you want?
6cf9a94a-c057-4df7-8047-200d7bf6226b
Oops sorry forgot the project ID, looking to install v20.11.1 (LTS)
Solution
That worked! I had to change
npm ci
to npm i
but seems to be working now. Thanks!npm ci
is preferred, what was the issue?My project exists in a mono repo and has no package-lock defined in the specific app. Going to fix this at some point since I fully understand its bad practice, but
npm ci
requires that the packge-lock exists. Just need to do some fiddeling with my monorepo to get it to work properly.gotcha