How do you install Discourse using Windows 10 Docker Desktop?

For my configuration, where the forum isn’t accessible from the Internet, but is from my own computer), I ignored the warning.

However, I needed a domain name to be resolved from my Windows browser, so I needed to do these steps:

  1. Redirect an arbitrary domain name (d.com here) to my machine by editing c:/windows/system32/drivers/etc/hosts. I added these lines:

    127.0.0.1         d.com
    255.255.255.255   broadcasthost
    ::1               localhost d.com
    
  2. Create a new file: C:\Users\yourWindowsUserName\.wslconfig and write this inside:

    [wsl2]
    localhostForwarding=true
    
  3. Reboot WSL:
    wsl --shutdown (Powershell)
    Or
    wsl.exe --shutdown (Ubuntu)

  4. In Ubuntu, start Docker (it doesn’t start automatically):
    service docker start

  5. Comment the SSL lines in /var/discourse/container/app.yml such as:

    #  - "templates/web.ssl.template.yml"
    #  - "templates/web.letsencrypt.ssl.template.yml"
    
  6. Rebuild