Skip to content

Commit f61e211

Browse files
added Docker post-installation steps (#2452)
1 parent 0455e64 commit f61e211

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

web/blog/2023-11-21-guide-windows-development-wasp-wsl.md

+26
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,36 @@ git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git
174174

175175
This allows us to share our Git username and password. Anything set up in Windows will work in WSL (and vice-versa) and we can use Git inside WSL as we prefer (via VS Code GUI or via shell).
176176

177+
### Docker post-installation steps
178+
179+
If you are running a PostgreSQL database locally (especially if you are using OpenSaas), it is recommended to complete those post-install steps in WSL, based on the official [Docker](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) guide. These work if you are experiencing an error similar to this: `docker: Error response from daemon: Ports are not available: .......`
180+
181+
First, run
182+
183+
```bash
184+
sudo groupadd docker
185+
```
186+
187+
command to create the `docker` group in case it doesn't exist. If it exists, don't worry, just continue with next steps. After that, add your current user to docker group by running
188+
189+
```bash
190+
sudo usermod -aG docker $USER
191+
```
192+
193+
where $USER is your username. After that, log out and log back in to apply the changes. Finally, run
194+
195+
```bash
196+
su -s $USER
197+
```
198+
177199
## Conclusion
178200

179201
Through our journey here, we have learned what WSL is, how it can be useful for enhancing our workflow with our Windows PC, but also how to set up your initial development environment on it. Microsoft has done a fantastic job with this tool and has really made Windows OS a much more approachable and viable option for all developers. We went through how to install the dev tools needed to kickstart development and how to get a handle on a basic dev workflow. Here are some important links if you want to dive deeper into the topic:
180202

181203
- [https://github.com/microsoft/WSL](https://github.com/microsoft/WSL)
182204
- [https://learn.microsoft.com/en-us/windows/wsl/install](https://learn.microsoft.com/en-us/windows/wsl/install)
183205
- [https://code.visualstudio.com/docs/remote/wsl](https://code.visualstudio.com/docs/remote/wsl)
206+
207+
```
208+
209+
```

0 commit comments

Comments
 (0)