I have the start of my Dockerfile as below. Currently this installs version 10 of Node JS but I need a minimum of version 12. How can I change this to get v12?
FROM ruby:2.6.5
# Install 3rd party dependencies.
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt update && \
apt -y install nodejs \
yarn \
build-essential \
libpq-dev
EDIT:
Error after trying @enrique-tejeda's answer:
[ 2/13] RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs: #5 0.328 /usr/bin/apt-get: /usr/bin/apt-get: cannot execute binary file #5 0.440 curl: (23) Failed writing body (0 != 7027) ------ failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c curl -fsSL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs]: exit code: 126