Open mattkomarnicki opened 3 years ago
This is what i used to target specific versions (using php-nginx:7.4). Sorry I haven't attempted this with alpine though.
RUN apt-get clean
RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
So I've found an answer on how to install specific version of nodejs.
My dockerfile goes as follows:
I want to install nodejs, version 14.18.1. So after
FROM
and beforeWORKDIR
, I've added:RUN apk add --update nodejs=14.18.1
Then as soon as I rebuild the image I get:
If I replace this line with
RUN apk add --update nodejs npm
then it works but it installs version 12 which not what I want.What am I doing wrong?