@@ -107,6 +107,7 @@ A Unix-based environment running docker (Docker Engine or Docker Desktop).
107
107
108
108
<details >
109
109
<summary >macOS users</summary >
110
+ <br >
110
111
111
112
``` sh
112
113
# 1. install xcode tools
@@ -119,7 +120,8 @@ brew install --cask docker
119
120
</details >
120
121
121
122
<details >
122
- <summary >Windows users</summary >
123
+ <summary >Windows users</summary >
124
+ <br >
123
125
124
126
``` sh
125
127
# powershell as administrator
@@ -135,11 +137,18 @@ winget install Docker.DockerDesktop
135
137
After device restart:
136
138
137
139
1 . Complete Ubuntu user setup - Ubuntu terminal should auto-open
138
- 2 . [ Enable ` systemd ` ] ( https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ ) - run ` sudo nano /etc/wsl.conf ` and update file to :
140
+ 2 . [ Enable ` systemd ` ] ( https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ ) :
139
141
``` sh
142
+ sudo nano /etc/wsl.conf
143
+ ```
144
+ ``` sh
145
+ # /etc/wsl.conf
140
146
[boot]
141
147
systemd=true
142
148
```
149
+ ``` sh
150
+ wsl.exe --terminate Ubuntu
151
+ ```
143
152
3 . [ Enable Docker Desktop integration with WSL2 Ubuntu] ( https://docs.microsoft.com/en-us/windows/wsl/media/docker-dashboard.png )
144
153
4 . [ Open Terminal and switch to Ubuntu] ( https://user-images.githubusercontent.com/17856665/192830999-f8f9c5af-8b4e-41c4-8f5e-c9c159fcf9ca.png )
145
154
5 . [ Make Ubuntu your default Terminal profile] ( https://user-images.githubusercontent.com/17856665/192833271-5a3170a0-caf6-45bf-b378-ac6eb1f2dfbc.png )
@@ -150,41 +159,39 @@ After device restart:
150
159
> 💡 If connection fails with ` Could not resolve host ` , and you have a VPN program installed, see _ WSL2 VPN fix_ below
151
160
152
161
<details >
153
- <summary >WSL2 VPN fix</summary >
162
+ <summary >WSL2 VPN fix</summary >
163
+ <br >
154
164
155
- ``` sh
165
+ See [ wsl-vpnkit documentation] ( https://github.com/sakai135/wsl-vpnkit/#wsl-vpnkit ) for more details.
166
+ ``` powershell
156
167
# powershell as administrator
157
- # 1. download vpnkit
158
168
wget -o wsl-vpnkit.tar.gz https://github.com/sakai135/wsl-vpnkit/releases/latest/download/wsl-vpnkit.tar.gz
159
- # 2. add vpnkit as linux distro
160
169
wsl --import wsl-vpnkit $env:USERPROFILE\wsl-vpnkit wsl-vpnkit.tar.gz --version 2
161
- wsl -d wsl-vpnkit
162
- # 3. switch to wsl2 ubuntu terminal
163
- wsl
164
- # 4. create an alias `vpnkit`
165
- printf ' # vpnkit - fix vpn network issues\nalias vpnkit="wsl.exe -d wsl-vpnkit service wsl-vpnkit"' >> ~ /.bashrc
166
- # 5. load the new alias
167
- exec bash
168
- # 6. start the vpnkit
169
- vpnkit start
170
- # 7. test internet connection again
170
+ ```
171
+ ```sh
172
+ # wsl2 ubuntu
173
+ wsl.exe -d wsl-vpnkit --cd /app cat /app/wsl-vpnkit.service | sudo tee /etc/systemd/system/wsl-vpnkit.service
174
+ sudo systemctl enable wsl-vpnkit
175
+ sudo systemctl start wsl-vpnkit
176
+ systemctl status wsl-vpnkit # should be Active
177
+ # test internet connection again
171
178
curl google.com
172
- # note that you can stop the fix with `vpnkit stop`, see https://github.com/sakai135/wsl-vpnkit
173
179
```
174
180
175
181
</details>
176
182
177
183
</details>
178
184
179
185
<details>
180
- < summary> Debian users< /summary>
186
+ <summary>Debian users (and Windows without Docker Desktop) </summary>
181
187
<br />
182
188
183
- Install Docker Engine on any Debian-based OS like Ubuntu or Raspberry Pi. This is also an alternative for Windows users running WSL2.
189
+ See [Install Docker Engine documentation](https://docs.docker.com/engine/install) for more details and other distro steps. \
190
+ This is also an alternative for Windows users running WSL2.
184
191
185
192
> 💡 If using WSL2, be sure to:
186
193
> 1. Enable `systemd` - see the _Windows users_ section
187
- > 2. [Disable Docker Desktop integration with WSL2](https://docs.microsoft.com/en-us/windows/wsl/media/docker-dashboard.png)
194
+ > 2. If installed, [disable Docker Desktop integration with WSL2](https://docs.microsoft.com/en-us/windows/wsl/media/docker-dashboard.png)
188
195
189
196
```sh
190
197
# 1. uninstall old docker versions
0 commit comments