Promise you will help us back, please help us by like and subscribe, if this solution works. To include the --network host option in a Docker Compose YAML file, you can add it under the services section for the specific service that you want to use the host network for. Here's an example: version: "3.9" services: my-service: image: my-image:latest network_mode: "host" In this example, we've added the network_mode parameter to the my-service service and set it to host. This will configure the container to use the host network for communication instead of creating a separate network. You can also add other service configuration options to this section, such as environment variables or volume mounts. Just make sure that the network_mode parameter is included and set to "host". Note that using the host network mode means that the container will share the network namespace with the host system, which may pose security risks. Make sure that you understand the implications of using this mode before deploying it in a production environment.