Edit: This has been updated to reflect that v2.0 has been released! View here.
There’s a fun bug in windows having to deal with the number of hostnames per line in your hosts file. Any hostnames after the first nine just won’t resolve. That’s fun. Right?
I’ve made some updates to the WHW image that will put each hostname on its own line. This should be a lot more friendly when it comes to multi-tenant solutions in docker.
As a refresher, here’s how you do this all with Sitecore 10:
version: "2.4"
services:
id:
networks:
default:
aliases:
- ${ID_HOST}
cm:
networks:
default:
aliases:
- ${CM_HOST}
cd:
networks:
default:
aliases:
- ${CD_HOST}
hostswriter:
image: rahnemann/windows-hosts-writer:2.0-nanoserver-1909
volumes:
- C:\windows\system32\drivers\etc:C:\driversetc
- type: npipe
source: '\\.\pipe\docker_engine'
target: '\\.\pipe\docker_engine'
environment:
TERMINATION_MAP: id,cm,cd:traefik
That’s right, you can now use WHW with 20H2 tags. The current tags available are:
- 1.5-nanoserver-1809
- 1.5-nanoserver-1909
- 1.5-nanoserver-2004
- 1.5-nanoserver-20H2
If you have any issues, drop them in the comments!
I can’t find your 1.5 release. The one on GitHub seems to be an older 2020 version. I’m looking for the fix that allows for more than eight domains.
It should be here: https://github.com/RAhnemann/windows-hosts-writer
The update was about 8 months ago. There’s no formal Github release, but you can always access it on docker hub: https://hub.docker.com/r/rahnemann/windows-hosts-writer/tags?page=1&name=1.5