title: How to setup laravel with npm using docker-compose?
body: <p>I have the next docker-compose.yml file</p>
  
  <pre><code>version: '2'
  services:
    # The Application
    app:
      build:
        context: ./
        dockerfile: app.dockerfile
      working_dir: /var/www/html
      volumes:
        - ./giftmeabetterplanet:/var/www/html
      environment:
        - "DB_PORT=3306"
        - "DB_HOST=database"
  
    # The Web Server
    web:
      build:
        context: ./
        dockerfile: web.dockerfile
      working_dir: /var/www/html
      links:
        - database:mysql
      volumes_from:
        - app
      ports:
        - 81:80
      environment:
        - "WEB_DOCUMENT_ROOT=/var/www/html/public"
    # The Database
    database:
      image: mysql:5.6
      volumes:
        - dbdata:/var/lib/mysql
      environment:
        - "MYSQL_DATABASE=homestead"
        - "MYSQL_USER=homestead"
        - "MYSQL_PASSWORD=secret"
        - "MYSQL_ROOT_PASSWORD=secret"
      ports:
          - "3306"
  
  volumes:
    dbdata:
  </code></pre>
  
  <p>I need to make NPM (node package manager) accessible somehow to build my JS and CSS files in 'web' container. </p>
  
  <p>app.dockerfile</p>
  
  <pre><code>FROM php:7.0.4
  
  RUN apt-get update &amp;&amp; apt-get install -y libmcrypt-dev \
      mysql-client libmagickwand-dev --no-install-recommends \
      &amp;&amp; pecl install imagick \
      &amp;&amp; docker-php-ext-enable imagick \
      &amp;&amp; docker-php-ext-install mcrypt pdo_mysql
  </code></pre>
  
  <p>web.dockerfile</p>
  
  <pre><code>FROM webdevops/php-apache-dev:ubuntu-16.04
  </code></pre>
  
  <p>I've tried the next way by extending web.dockerfile </p>
  
  <pre><code>FROM orlandohohmeier/local-npm
  FROM webdevops/php-apache-dev:ubuntu-16.04
  </code></pre>
  
  <p>But npm is not accessible from the command line in 'web' container. Maybe i don't understand some concepts but i just want to compile my stiles, javascript files and copy fonts from node-modules. </p>
  
  <p>Best regards. Ivan</p>