Can't get DNS to work on Docker

Tailscale version 1.42
Operative System where Tailscale in Docker is running:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

Machine is a fresh install of Ubuntu Server.

I’m using NextDNS for the DNS entries

This is how it looks in the admin console

In NextDNS I’ve defined a dns rewrite for the IP address of my Windows client. From my windows client I can ping this address (example.winclient.tail) and it answers.

Installed Docker version 24.0.2, build cb74dfc
Created a new directory tailscaledocker to hold state
Created a file docker-compose.yml

    image: tailscale/tailscale
    restart: unless-stopped
    container_name: tailscaled
      - TS_AUTHKEY=my-tailscale-auth-key
      - TS_STATE_DIR=/var/lib/tailscale
      - TS_EXTRA_ARGS=--accept-dns
      - /home/ubuntuserver/tailscaledocker/data/tailscale/lib:/var/lib/tailscale
      - /dev/net/tun:/dev/net/tun
    network_mode: host
      - NET_ADMIN
      - NET_RAW

Started successfully I can ping the Windows machine from this server using the IP address.
However, Ubuntu Server machine cannot resolve DNS example.winclient.tail.

Any ideas?

Couldn’t fix this for now I’m going to install it directly instead of using docker