Docker error : invalid mount config for type "bind" when using network_mode: host

I want to user "host" network using docker-compose and I used network tags. I was suggested to use "network_mode: host" when I raised the issue at :

Docker ERROR: only one instance of "host" network is allowed

So I changed my configuration as per suggestion to

version: '3.4'
services:
  testcontainer:
    build:
      context: .
    image: testcontainer
    container_name: testcontainer
    hostname: testcontainer
    ports:
      - 9200:9200
      - 9300:9300
      - 5601:5601
      - 9001:9001
    ulimits:
      memlock:
        soft: -1
        hard: -1
    network_mode: host 

And now I am getting the following error :

Creating testcontainer … error

ERROR: for testcontainer Cannot create container for service
testcontainer: invalid mount config for type "bind": bind source path
does not exist

ERROR: for testcontainer Cannot create container for service
testcontainer: invalid mount config for type "bind": bind source path
does not exist ERROR: Encountered errors while bringing up the
project.

When I use "docker-compose up" command. Can somebody suggest any solution or suggest a mechanism how one can use host network using docker-compose.yml

I am using Centos OS.

Source: Docker Questions