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!