In this guide you will set up WSL on your Windows, install Docker and run the db-sync docker image.
- PostGIS database
- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 or Windows Server 2022
If you have older system version see manual install
Open PowerShell or command prompt with administrative rights and the following command and restart your system:
wsl --install
If you have problems installing, see Microsoft WSL Installation docs for desktops or server 2022
On VM servers, you need to enable nested virtualisation on the parent Hyper-V host, see WSL FAQ.
You can now run your Ubuntu terminal from Windows Start menu and install Docker in WSL.
In your WSL Ubuntu terminal:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo apt update
sudo apt-cache policy docker-ce
sudo apt install docker-ce
Check the installation:
sudo docker run hello-world
In case of problems consult Docker on Ubuntu page.
After the steps above, you can run the docker image as described in Running with Docker.
If you run PostgreSQL server on your Windows host machine you can use $(hostname).local
as the host name.