Speed ​​up Docker on MacOS

Tram Ho

Hello friends,

Today I would like to share how to increase perfomance when running Docker on OS.

Hardware:

  • MacOS (any operating system)

Software:

  • Docker for MAC
  • Internet
  • IDE Visutal Code

Start initializing and starting container containers:

When copying source code (such as wordpress) into the www directory and check to see how? Some operations become very slow! This is because the communication between the host machine (MacOS) and the virtual machine takes place directly and without going through the cache.

To fix this, we add a cached constant to the volumes of the definition section of www:

Restart docker-compose:

$docker-compose down

$docker-compose up -d

Cheer!

Docker has become as fast as a Linux virtual machine.

Chia sẻ bài viết ngay

Nguồn bài viết : Viblo