Opened 7 months ago
Last modified 6 hours ago
#62196 new defect (bug)
Improve documentation for using the local Docker environment on Windows
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | needs-patch good-first-bug |
Focuses: | Cc: |
Description
The README.md file has some basic instructions for getting the local Docker development environment up and running. Unfortunately, the instructions do not work on Windows. While it does take a bit more effort, the environment can run on Windows. These extra steps should be better documented.
Change History (4)
#2
@
7 months ago
could you add any details about how you get the environment up and running successfully on Windows
I use WSL. I don't recall other steps, since I set them once and forgot.
#3
follow-up:
↓ 4
@
3 months ago
I had tried setting up on my Windows machine following the instructions in README, I didn't face any issues (I have WSL 2 installed already). I tried unchecking use WSL 2 based engine
to check if it can cause issue but I can't even uncheck it.
I think for latest Windows versions Docker uses WSL backend by default to setup.
https://docs.docker.com/desktop/features/wsl/#:~:text=Depending%20on%20which%20version%20of%20Windows%20you%20are%20using%2C%20Docker%20Desktop%20may%20prompt%20you%20to%20turn%20on%20WSL%202%20during%20installation.
#4
in reply to:
↑ 3
@
6 hours ago
Replying to karthikeya01:
I think for latest Windows versions Docker uses WSL backend by default to setup.
I can confirm as @karthikeya01 said that there are no issues with the basic setup both in Windows PowerShell and inside the WSL (Ubuntu in my case) shell.
Once I tried running over Hyper-V with VMWare and was a little tricky because you have to configure docker connection to access "remotely" to the VM, its well handled by docker desktop.
For nested virtualization, I have no idea on how it runs, but also seems to be possible: https://docs.docker.com/desktop/setup/vm-vdi/
Mainly I believe that instead of adding "installation notes" for each system, I think its OK as it's currently explained:
You will also need Docker installed and running on your computer. Docker is the virtualization software that powers the local development environment. Docker can be installed just like any other regular application.
As long as you can run docker
in whatever shell you use, you have your npm
set-up, no extra instructions are needed. Docker Desktop can be mentioned.
Instead of using choco
I think the more modern aproach could be also commented with winget
winget install -e --id Docker.DockerDesktop
And for NPM, winget also installing fnm
: https://nodejs.org/en/download/ (reminding to use a lesser version of NPM).
Finally, the only trouble is the file permissions part. Maybe some information could be expanded on this topic. By default, you will not be able to play around with files and folders within the working WP installation, not even with fs_method
direct
(it will trigger the Connection Information). This is mainly why I work directly on the WSL2 container and not over my Windows Filesystem (for Windows testing I prefer to use FlyEnv).
As Windows has some particular quirks, especially when interacting with Linux images for Docker, it is generally recommended to use Windows Subsystem for Linux (WSL) if possible, or at least change the Docker engine to use Linux over Windows binaries, so ensure compatibility.
Although there are some scenarios where running in experimental mode will let the environments load as intended, experimental is obviously not a great things to expect contributors to run. I've gathered together some suggested wording that can be added alongside the instructions for setting up a local environment in our readme: