We’ve got a docker-compose setup that runs three containers:
- web server with WordPress
- database server with MariaDB
- Node.js application that the WordPress site talks to
All containers have mapped volumes like this:
wp: image: our/wp ports: - "80:80" volumes: - ./blog_data:/var/www/html db: image: mysql:latest ports: - "3306:3306" volumes: - ./db_data:/var/lib/mysql node: image: our/node-app ports: - "3000:3000" volumes: - ./node_data:/usr/share/node-data-dir
The WordPress site uploads some of its files to the Node.js server via HTTP so there’s quite a bit of networking and file operations involved.
When I run this, it is extremely slow on Docker for Windows. For comparison, these are times per one upload operation as we tried them:
- Linux: ~0.6s
- Docker for Mac: ~3s
- Docker for Windows: ~40s
I get that everything is slower on Windows, and my machine is not as powerful as colleague’s Mac, however, the difference seems too large.
Any ideas if this is “normal” and I should get 10x slower experience than on Docker for Mac (which is also virtualized and not as fast as Linux)? Is there something obviously wrong with my docker-compose.yml? I’m quite new to Docker.