cabrinoob / rancher-registrator

A registrator-like made for Consul & Rancher
15 stars 16 forks source link

Can not get network_mode host #1

Closed blackside closed 7 years ago

blackside commented 7 years ago

Hi,

Great job with this registrator! I just cant seem to get it to run in host mode. It always ends up in rancher managed mode...

Deploying with rancher-compose :

rancher-registrator:
      labels:
        io.rancher.scheduler.global: 'true'
        io.rancher.container.pull_image: always
        io.rancher.container.hostname_override: container_name
        io.rancher.container.network: 'true'
        io.rancher.container.dns: 'true'
      tty: true
      network_mode: host
      restart: always
      image: rancher-registrator:1
      links:
        - consul-proxy
      environment:
        LOCAL_CONSUL_AGENT: http://localhost:8500
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /etc/timezone:/etc/timezone:ro
      stdin_open: true

I have tired it just manually with the rancher gui too, (explicitly choosing host as network mode) but no luck. It still ends up with managed...

Rancher 1.3.6 Docker 1.12.6

blackside commented 7 years ago

Ok,

After some experimenting I can get it in host mode by removing " io.rancher.container.network: 'true' ". And it seems to work.

cabrinoob commented 7 years ago

Ok, I'll change the readme. ;)