This document contains information about how you can speed up docker-compos usage in development stage.
Reasons? ᐞ
IO traffic is the main reason why using Docker on certain environments will be quite slow.
Environments with problems ᐞ
Basically Windows and Mac; with linux you should not have these problems at all.
Windows ᐞ
The "most" clean solution to solve this atm is to run eg. Ubuntu desktop within VMware / VirtualBox machines. And this means that you actually run your favorite IDE inside that virtual machine.
Another way is to use docker-sync. Application itself already contains necessary docker-sync.yml configuration file to help with this.
Mac ᐞ
With Mac there is a bit speed difference versus pure *inux installation, but you could try to speed that up by using Docker for Mac Edge
Some benchmark about Docker for Mac
versus Docker for Mac Edge
here
And if that Docker for Mac Edge isn't fast enough for you, you could also setup that docker-sync for your environment.
Linux ᐞ
No need to do anything ¯\_(ツ)_/¯
Installation of docker-sync ᐞ
Follow install instructions from docker-sync website.
Configuration ᐞ
Create a compose.override.yaml
file with following content:
#
# This file should NOT be added to your VCS, only purpose of this is to
# override those volumes with docker-sync.yml config
#
services:
node:
volumes:
- frontend-code:/app:cached
volumes:
frontend-code:
external: true
Startup ᐞ
To start application you just need to use command;
docker-sync-stack start