Docker container always reloaded

13 views
Skip to first unread message

Guy Knights

unread,
Mar 2, 2016, 1:22:36 PM3/2/16
to Ansible Project
I have a particular task that starts a docker container, and for some reason every time it runs it reloads the container. The task definition is below:

docker:
    name: zabbix
    image: "zabbix/zabbix-{{ zabbix.version }}"
    state: reloaded
    pull: always
    expose:
      - 80
      - 10051
    ports:
      - "80:80"
      - "10051:10051"
    env:
      TZ: "{{ timezone }}"
      ENVIRONMENT: "{{ env }}"
      ZS_DBHost: "{{ zabbix.db.host }}"
      ZS_DBUser: "{{ zabbix.db.user }}"
      ZS_DBPassword: "{{ zabbix.db.password }}"

None of the above options have changed between runs so I'm not sure why it decides to reload every time. I have other docker tasks that (correctly) only reload the container when the parameters have changed.

I saw a thread about adding 'net: bridge' to stop this behaviour which I tried, but it didn't work. Does anyone have any suggestions as to how I can make it operate correctly?

Thanks,
Guy
Reply all
Reply to author
Forward
0 new messages