Closed baseballlover723 closed 1 year ago
@CamJN Kindly bumping to check this PR. Reported year ago and seems like an easy & small fix.
I am using this method
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null
RUN echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install -y --no-install-recommends --no-install-suggests nginx-extras rsyslog libmagickwand-dev imagemagick wkhtmltopdf ghostscript nodejs yarn
RUN sed -i 's/policy\(.*\)"none"\(.*\)PDF/policy\1"read|write"\2PDF/' /etc/ImageMagick-6/policy.xml
RUN node --version
RUN yarn --version
Node-10 has been EOL for a long time!
Besides that, for Rails 7 with traditional JS bundling, using https://github.com/rails/jsbundling-rails with esbuild
it is required to have nodejs>=12
:
error esbuild@0.16.16: The engine "node" is incompatible with this module. Expected version ">=12". Got "10.19.0"
I noticed that it was still using node 10.19.0, in the ruby images. This was preventing us from updating some of our node dependencies, since they want a more recent version of node. This PR updates the install script to install node by just running the nodejs install script used in the nodejs image, instead of just installing node via the default apt.