0

I am using Docker to run acceptance tests. The website in production is fast and loads almost immediately. On my docker container, the a lot of time is just spent waiting:

The docker container Waiting (TTFB) time is about 5 seconds:

Docker Container Network

The production website's (TFFB) time is 200 ms.

Production Website Network

I have tried to delegate the volumes in my DockerComposer file:

    volumes:
      - ./config/php.conf.ini:/usr/local/etc/php/php.ini:delegated
      # Docker WordPress files will be placed at the root.
      - .:/var/www/html:delegated

And the speed is still awful. An acceptance test that should take 3 seconds to run is taking about 20 seconds with Docker.

Why is there such a long waiting time with Docker? I love it but if this continues I am better off running MAMP. I LOVE Docker, if there is a way to improve this massive wait time, please pitch in.

csaborio
  • 111
  • 1
  • 7
  • 1
    What is your host OS? Does [Docker in MacOs is very slow](https://stackoverflow.com/questions/55951014/docker-in-macos-is-very-slow) describe your situation? – David Maze Feb 02 '21 at 02:00
  • Total apologies, running on OS X. I stumbled upon this article: https://medium.com/homullus/beating-some-performance-into-docker-for-mac-f5d1e732032c I will try to use Mutagen to avoid having to use volumes. – csaborio Feb 02 '21 at 02:06

0 Answers0