Skip to content

Commit b35103c

Browse files
authored
Merge pull request codekitchen#43 from codysnider/codysnider/windows-readme
windows instructions
2 parents 919e87e + 9a6ff36 commit b35103c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,42 @@ directly on the host, as it defaults to `127.0.0.1`.
171171
Different Linux distributions will require different steps for configuring DNS
172172
resolution. The [Dory](https://github.com/FreedomBen/dory) project may be useful
173173
here, it knows how to configure common distros for `dinghy-http-proxy`.
174+
175+
### Windows
176+
177+
* For Docker for Windows, you can use `127.0.0.1` as the DNS IP.
178+
179+
From Powershell:
180+
```
181+
docker run -d --restart=always `
182+
-v /var/run/docker.sock:/tmp/docker.sock:ro `
183+
-p 80:80 -p 443:443 -p 19322:19322/udp `
184+
-e CONTAINER_NAME=http-proxy `
185+
-e DNS_IP=127.0.0.1 `
186+
--name http-proxy `
187+
codekitchen/dinghy-http-proxy
188+
```
189+
190+
From docker-compose:
191+
```
192+
version: '2'
193+
services:
194+
195+
http-proxy:
196+
container_name: http-proxy
197+
image: codekitchen/dinghy-http-proxy
198+
environment:
199+
- DNS_IP=127.0.0.1
200+
- CONTAINER_NAME=http-proxy
201+
ports:
202+
- "80:80"
203+
- "443:443"
204+
- "19322:19322/udp"
205+
volumes:
206+
- /var/run/docker.sock:/tmp/docker.sock:ro
207+
```
208+
209+
You will have to add the hosts to `C:\Windows\System32\drivers\etc\hosts` manually. There are various Powershell scripts available to help manage this:
210+
211+
- http://get-carbon.org/Set-HostsEntry.html
212+
- https://gist.github.com/markembling/173887

0 commit comments

Comments
 (0)