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 Answers 2

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)
2
  • 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... Aug 17, 2018 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 Syed
    Jun 2, 2019 at 7:29
0

Try this for superp performance on docker for magento. Tested on macOS for magento2.3.5 https://arunkp123.github.io/magdock/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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