title: Composer memory limit docker
body: <p>I have a problem with <strong>composer install</strong> on docker. This is my <strong>docker-compose</strong> file:</p>
  
  <pre><code>version: '3'
  services:
  
    webserver:
      image: nginx:latest
      ports:
        - 80:80
        - 433:433
      volumes:
        - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
        - ./:/var/www/html/
      links:
        - php-fmp
        - db
      networks:
        - app-network
  
    php-fmp:
      build: docker/php-fmp
      volumes:
        - ./:/var/www/html/
      ports:
        - 9000:9000
      links:
        - db
      networks:
        - app-network
  
    db:
      image: mysql
      ports:
        - 3306:3306
      volumes:
        - /var/lib/mysql
      command: --default-authentication-plugin=mysql_native_password
      restart: always
      environment:
        - MYSQL_DATABASE=goexpress
        - MYSQL_USER=root
        - MYSQL_PASSWORD=root
        - MYSQL_ROOT_PASSWORD=docker
      networks:
        - app-network
  
  networks:
    app-network:
      driver: bridge
  </code></pre>
  
  <p>I try to execute <strong>docker-compose run php-fmp composer install</strong> it starts after some minutes it shows <strong>memory limit xxxxxxxxx</strong>. I have tried also <strong>memory_limit=-1</strong>. </p>
  
  <p><strong>My laptop memory: 6GB.</strong> </p>
  
  <p>In another pc it works perfect. </p>
  
  <p>Before upgrade of memory it has worked. Memory before was 4GB now it is 6GB. The project that I want to run is symfony.</p>