title: How can I install ruby 2.7.2 (Dockerfile) in Ubuntu 18.04?
body: <p>I am creating a Dockerfile and somehow I can't install the ruby version I need: 2.7.2 . Since I just need this version, I don't want to install ruby through rbenv or rvm. I tried &quot;apt install ruby&quot;, &quot;apt get install ruby 2.7.2&quot;, &quot;apt install ruby-full&quot; and the version installed is always 2.5.1. Any Ideas?</p>
  <p>This is how my Dockerfile looks like:</p>
  <pre><code>FROM nvidia/cuda:10.1-base-ubuntu18.04
  
  LABEL version=&quot;0.0.1&quot;
  
  LABEL maintainer=&quot;mjg&quot;
  
  RUN apt update \
      &amp;&amp; apt install -y python3.6 python3-pip \
      &amp;&amp; apt install -y ruby
  
  WORKDIR /cvlib
  
  RUN pip3 install --upgrade pip; \
      pip3 install opencv-python tensorflow cvlib; \
      apt install -y libsm6 libxext6 libxrender-dev libgl1-mesa-glx; \
      apt remove -y python3-pip
  
  WORKDIR /app
  
  COPY . .
  
  VOLUME [ &quot;/app/blurred-images&quot;, &quot;app/source-images&quot; ]
  </code></pre>