I'm finding it difficult to auto-insert the DockerNAT IP inside the container, but this seems to work:
--add-host=dockerhost:$((Get-NetIPAddress -AddressFamily IPv4 -InterfaceA lias "vEthernet (DockerNAT)" | Select IPAddress).IPAddress;) -e DISPLAY=dockerhost:0.0
or
--add-host=dockerhost:$(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAl ias "vEthernet (DockerNAT)" | Select-Object -ExpandProperty 'IPAddress';) -e DISPLAY=dockerhost:0.0
EDIT: this works too:
DISPLAY=host.docker.internal:0.0
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm finding it difficult to auto-insert the DockerNAT IP inside the container, but this seems to work:
or
EDIT: this works too: