title: Running composer install in docker container
body: <p>I have a docker-compose.yml script which looks like this:</p>
  
  <pre><code>version: '2'
  services:
    php:
      build: ./docker/php
    volumes:
      - .:/var/www/website
  </code></pre>
  
  <p>The DockerFile located in ./docker/php looks like this:</p>
  
  <pre><code>FROM php:fpm
  
  RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  RUN php composer-setup.php
  RUN php -r "unlink('composer-setup.php');"
  RUN mv composer.phar /usr/local/bin/composer
  RUN composer update -d /var/www/website
  </code></pre>
  
  <p>Eventho this always fails with the error</p>
  
  <pre><code>[RuntimeException]
  Invalid working directory specified, /var/www/website does not exist.
  </code></pre>
  
  <p>When I remove the RUN composer update line and enter the container, the directory does exist and contains my project code.</p>
  
  <p>Please tell me if I am doing anything wrong OR if I'm doing the composer update on a wrong place</p>