Docker network and container use the LAN

I have a LAN with 192.168.2.0/24.

A docker machine with two network cards

eth0: 192.168.2.150/24
eth1: 192.168.2.151/24

I use 192.168.2.150 to manage the docker machine.

I want to broadcast the service of a container on the LAN at 192.168.2.151

How should I configure the network ?

If by “broadcast” you mean you want to make the container avilable on that ip address, you can just forward the port from the specific IP address.

CLI:

docker run -p 192.168.2.151:80:80 ...

Compose

services:
  servicename:
    ports:
      - 192.168.2.151:80:80