title: How to install homebrew on Ubuntu inside Docker container
body: <p>When I try to <a href="https://docs.brew.sh/Homebrew-on-Linux#install" rel="noreferrer">install</a> homebrew on Ubuntu 18.04</p>
  
  <pre><code># Dockerfile
  FROM ubuntu:18.04
  
  RUN apt-get update &amp;&amp; apt-get install build-essential curl file git -y
  RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
  </code></pre>
  
  <p>getting errors:</p>
  
  <blockquote>
    <p>==> Add Ruby to your PATH by running: PATH=/root/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin:$PATH
    Don't run this as root!</p>
  </blockquote>