1

According to official ocumentation, the following should work

version: '3.8'
services:
  webapp:
    image: mcr.microsoft.com/dotnet/framework/aspnet:4.8
    network_mode: host

(tried both host and "host")

But it complains with network host not found:

docker-compose up -d
Starting 32f22992dc86_docker_webapp_1 ... error

ERROR: for 32f22992dc86_docker_webapp_1  Cannot start service webapp: network host not found

ERROR: for webapp  Cannot start service webapp: network host not found
ERROR: Encountered errors while bringing up the project.

What am I missing?

Luis Mesa
  • 153
  • 1
  • 10

1 Answers1

10

Taken from somewhere else in the documentation as well: The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server. Same for docker-compose network_mode, of course.

Luis Mesa
  • 153
  • 1
  • 10