title: Composer is running as root in docker, even though user is specified
body: <p>So I have a docker-compose file:</p>
  
  <p>version: '2'</p>
  
  <pre><code>services:
      cmd:
          build:
              dockerfile: ./cmd/Dockerfile
              context: .
              args:
                  version: 7.3
          user: "1000"
          container_name: cmd
          restart: always
          volumes:
              - ~/Documents/projects:/projects
              - /etc/passwd:/etc/passwd
          links:
              - mysql
  </code></pre>
  
  <p>My dockerfile:</p>
  
  <pre><code>ARG version
  
  FROM php:${version}-cli
  
  # update 
  RUN apt-get update
  
  # install php extensions
  RUN apt-get install -y zlib1g-dev
  RUN apt-get install -y libzip-dev
  RUN docker-php-ext-install pdo_mysql
  RUN docker-php-ext-install zip
  
  # install composer
  RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
  
  # install laravel/lumen
  RUN composer global require laravel/installer
  RUN composer global require laravel/lumen-installer
  
  # add to path
  ENV PATH "$PATH:~/.composer/vendor/bin"
  
  # keep the container running
  ENTRYPOINT ["tail", "-f", "/dev/null"]
  </code></pre>
  
  <p>All of my composer files are under /root/ rather than $user even though I specified my user in the docker-file</p>