title: Installing Node 10 on Docker container - Keeps installing node v12
body: <p>I had another question open for this issue but I realized the context wasn't correct since I'm running this on docker, hence this new post.</p>
  <p>I am trying to install node 10 on a docker container, but the command doesn't seem to work correctly, or give the desired result. Instead it always installs node v12</p>
  <p>This is the dockerfile</p>
  <pre><code>FROM php:7.3
  
  # Install Composer
  RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  RUN apt-get update
  RUN apt-get install -y git zip unzip
  
  # Install extra PHP Extension
  RUN apt-get install -y libpq-dev zlib1g-dev libicu-dev g++ libxml2-dev libpng-dev libzip-dev
  RUN docker-php-ext-install pdo pdo_pgsql intl pcntl zip intl bcmath soap gd
  
  # Setup SSH keys
  RUN mkdir -p /root/.ssh
  ADD ssh/id_rsa /root/.ssh/id_rsa.encoded
  RUN base64 --decode /root/.ssh/id_rsa.encoded &gt; /root/.ssh/id_rsa
  RUN rm /root/.ssh/id_rsa.encoded
  RUN chmod 700 /root/.ssh
  RUN chmod 600 /root/.ssh/id_rsa
  RUN echo &quot;Host *&quot; &gt; /root/.ssh/config
  RUN echo &quot;  StrictHostKeyChecking no&quot; &gt;&gt; /root/.ssh/config
  RUN echo &quot;  UserKnownHostsFile=/dev/null&quot; &gt;&gt; /root/.ssh/config
  
  # Install Nodejs
  RUN apt-get install -y gnupg
  RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
  RUN apt-get install -y nodejs build-essential
  RUN node -v
  </code></pre>
  <p><code>node -v</code> returns <code>v12.22.12</code></p>
  <p>I've posted the entire file since I am not sure if something else is causing this.</p>
  <p>I even tried adding</p>
  <pre><code>apt-get remove nodejs
  </code></pre>
  <p>in case the version was being cached, but that didn't help either.</p>
  <p>Can't figure out why it doesn't install node10 despite all sources indicating that it should.</p>
  <p>Thanks for any help.</p>