DEV Community

Aleksey Reprintsev
Aleksey Reprintsev

Posted on

3 3

Low performance of Ruby on Rails in Docker under Windows

You can improve the performance of Ruby on Rails in Docker under Windows 10 if you run docker-compose not from Windows, but from WSL.

For example, if the source code of the project is in C:\Users\user\projects\myproject, you need to copy it to WSL - /home/user/projects/myproject

The WSL file system from under Windows is accessible via \\wsl$, you can copy myproject via File Explorer or terminal from C:\Users\user\projects\myproject to \\wsl$\Ubuntu-20.04\home\user\projects\

Then, using your favorite distribution, run WSL, go to the directory with the copied code and run docker-compose

cd ~/projects/myproject
docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

To edit code from Windows, you can open the \\wsl$\Ubuntu-20.04\home\user\projects\myproject directory in your favorite editor

In my case, the rendering speed has increased by about 10 times.

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay