This Qiita is a memo of the process and result of trying to create a Docker environment.
In conclusion, it was important to ** set up and use WSL2 properly **.
I want to run a super funny rails project in a Docker environment.
I found that using WSL2 caused some troublesome problems, so I decided to create a virtual environment with VM ware.
vagrant up
, vagrant ssh
docker
commandIt takes about 4 or 5 minutes to access localhost and display the top page after rails s
.
Windows 10 Home does not have a Hyper-V environment, but if you use WSL2 well, you can use Docker, so I tried it.
Like vagrant, the loading time to access localhost is unusually long ... (5,6 minutes)
The problem that occurred above was that the loading time was abnormally long.
Upon investigation, the cause of this seems to be that disk access is taking a long time.
Specifically, in the above [What I did 2-1], ** from the ubuntu terminal with / mnt / c
(go to the windows directory), I specified the project I want to run **, loading time Turned out to be abnormally long
** Instead of going to the windows directory in / mnt / c
, create a project on ubuntu where you want to run docker and run it. ** **
The loading time is about 10s.
Building a docker environment on Windows 10 Home is really annoying: thumbsdown:
However, if you set WSL2 properly, you can build an environment much faster than VM.
Recommended Posts