title: Dockerfile - How to set ENV variable up by reading content of local file in
body: <p>I'm working on a Ruby application and I set the version to use in a<code>.ruby-version</code> file.</p>
  
  <pre><code>2.5.0
  </code></pre>
  
  <p>I use Docker to deploy the application and in my <code>Dockerfile</code> I set the version to be installed in an environment variable.</p>
  
  <pre><code>ENV RUBY_VERSION 2.5.0
  </code></pre>
  
  <p>I'd like to be able to refer to the value in the <code>.ruby-version</code> file at the time of build instead of hard-write the version.</p>
  
  <p>So, I need to update the value just in one place instead of multiple ones.</p>
  
  <p>I have looked around but nothing seems to address my issue.</p>