My docker-compose.yml contains this:
version: '3.2'
services:
  mysql:
    image: mysql:latest
    container_name: mysql
    restart: always
    network_mode: "host"
    hostname: localhost
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
    volumes:
      - $HOME/data/datasql:/var/lib/mysql
    ports:
      - 3306:3306
  user-management-service:
    build: user-management-service/
    container_name: user-management-service
    restart: always
    depends_on:
      - mysql
      - rabbitmq
      - eureka
    network_mode: "host"
    hostname: localhost
    ports:
      - 8089:8089
When I try to do docker-compose up, I get the following error:
"host" network_mode is incompatible with port_bindings
Can anyone help me with the solution?
 
     
     
     
     
     
    