3

we are using Docker on macOS for development and deployment and have massive performance problems especially in deployment.

Our deployment does a full project build with:

  • git clone
  • composer install
  • bin/magento setup:static-content:deploy en_US de_DE --exclude-theme Magento/blank --exclude-theme Magento/luma --force (take 3000 secs!!!!)
  • bin/magento setup:di:compile (take ~1000secs!!!!)

Does anyone know why these processes took that much time?

Update 08.2018

Now we are using docker-sync which "works", but adds an extra layer of complexity to all our M" projects which I want to avoid.

It's such a shame for Magento that it does not optimize for development workflow. All other projects like Laravel, Symfony, TYPO3, Drupal etc works like a charm but M2 sucks in performance caused by the count of files which needs to be read in a request lifecycle.

You can read more about this problem in this post: https://docs.docker.com/docker-for-mac/osxfs-caching/

2

Shared Filesystem for Docker on MacOS is nightmarishly slow.

I will suggest:

  • Do not use a shared filesystem at all (and use PhpStorm Deploymechanism or http://docker-sync.io/)
  • Share only your code (using composer base instalation and share app/code/YourVendor or app/theme/*/YourVendor)
  • 1
    currently we are using docker-sync, but it's such an extra part of complexity, which I want to kick off. The crux is each other php project like M1, Laravel, TYPO3 etc. works like a charm and only M2 sucks with all its files... – bambamboole Aug 17 '18 at 10:07
  • Hi @KAndy, bambamboole It will be very appreciating if you can help me in a related issue. I found very little help for docker+Git and MacOS issues magento.stackexchange.com/questions/275149/… – Ajwad Taqvi Jun 2 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.