title: How to correctly install RVM in Docker?
body: <p>This is what I have in my <code>Dockerfile</code>:</p>
  
  <pre><code>RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
  RUN curl -L https://get.rvm.io | bash -s stable
  RUN /bin/bash -l -c "rvm requirements"
  RUN /bin/bash -l -c "rvm install 2.3.3"
  </code></pre>
  
  <p>Works just fine, however, when I start the container, I see this:</p>
  
  <pre><code>$ docker -it --rm myimage /bin/bash
  /root# ruby --version
  ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
  /root# /bin/bash -l -c "ruby --version"
  ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
  </code></pre>
  
  <p>Obviously, this is not what I want. As far as I understand, the problem is that <code>bash</code> doesn't run <code>/etc/profile</code> by default. That's why Ruby is not coming from the RVM installation. How can I fix that?</p>