/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found

I deployed filebeat container through ansible. The container went in restarting loop.

Below is the output of 'docker logs filebeat'

/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found
/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found

But when i pull the image manually and run a container from it, it's working all fine.

Where am I going wrong here?

Below is my ansible role to deploy filebeat container:

- name: Create filebeat config volume
  file: path={{ filebeat_config_host_path }}
        state=directory
        owner={{ filebeat_uid }}
        group={{ filebeat_group_uid }}
        mode=0755

- name: Copy filebeat conf to host
  template: src=filebeat.yml
            dest={{ filebeat_config_host_path }}

- name: Create filebeat container
  docker_container:
    name: "filebeat"
    image: "{{filebeat_image}}"
    volumes:
      - "/var/lib/docker/containers:/usr/share/filebeat/dockerlogs"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "{{ filebeat_config_host_path }}:{{ filebeat_config_container_path }}"
    restart_policy: always
    state: started
    recreate: yes

Can you share the content of your docker-entrypoint file?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.