title: --allow-root doesn't work running wp-cli in docker container
body: <p>When using WP CLI in docker, I need to execute it as root.
  I need to add the flag <code>--allow-root</code> directly in .bashrc and I am trying to figure out why it doesn't work.</p>
  
  <pre><code>FROM webdevops/php-dev:7.3
  
  # configure postfix to use mailhog
  RUN postconf -e "relayhost = mail:1025"
  
  # install wp cli
  RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &amp;&amp; \
      chmod +x wp-cli.phar &amp;&amp; \
      mv wp-cli.phar /usr/local/bin/wp &amp;&amp; \
      echo 'wp() {' &gt;&gt; ~/.bashrc &amp;&amp; \
      echo '/usr/local/bin/wp "$@" --allow-root' &gt;&gt; ~/.bashrc &amp;&amp; \
      echo '}' &gt;&gt; ~/.bashrc
  
  WORKDIR /var/www/html/
  </code></pre>
  
  <p>my .bashrc</p>
  
  <pre><code># ~/.bashrc: executed by bash(1) for non-login shells.
  
  # Note: PS1 and umask are already set in /etc/profile. You should not
  # need this unless you want different defaults for root.
  # PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
  # umask 022
  
  # You may uncomment the following lines if you want `ls' to be colorized:
  # export LS_OPTIONS='--color=auto'
  # eval "`dircolors`"
  # alias ls='ls $LS_OPTIONS'
  # alias ll='ls $LS_OPTIONS -l'
  # alias l='ls $LS_OPTIONS -lA'
  #
  # Some more alias to avoid making mistakes:
  # alias rm='rm -i'
  # alias cp='cp -i'
  # alias mv='mv -i'
  wp() {
  /usr/local/bin/wp "$@" --allow-root
  }
  </code></pre>
  
  <p>when I try to execute any wp command I get this error:</p>
  
  <pre><code>Error: YIKES! It looks like you're running this as root. You probably meant to run this as the user that your WordPress installation exists under.
  
  If you REALLY mean to run this as root, we won't stop you, but just bear in mind that any code on this site will then have full control of your server, making it quite DANGEROUS.
  
  If you'd like to continue as root, please run this again, adding this flag:  --allow-root
  
  If you'd like to run it as the user that this site is under, you can run the following to become the respective user:
  
      sudo -u USER -i -- wp &lt;command&gt;
  </code></pre>
  
  <p>It looks like that command line doesn't consider what I input into .bashrc</p>
  
  <p>Guys, do you have any suggestion how to fix this problem?</p>