# Elastic-agent not fond when running in Docker

**URL:** <https://discuss.elastic.co/t/elastic-agent-not-fond-when-running-in-docker/318948>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [November 15, 2022, 10:44am UTC](https://discuss.elastic.co/t/elastic-agent-not-fond-when-running-in-docker/318948 "2022-11-15T10:44:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Davies1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/philip_davies1/32/113371_2.png) [@Philip\_Davies1](https://discuss.elastic.co/u/Philip_Davies1)\
**Post date:** [November 15, 2022, 10:44am UTC](https://discuss.elastic.co/t/elastic-agent-not-fond-when-running-in-docker/318948/1 "2022-11-15T10:44:29Z")

</div>

Hi All,

I am running my ELK setup on a Docker Swarm cluster and I have Kibana, Elasticsearch, Metricbeats all up and running fine. I am trying to setup fleet and deploy my first elastic agent. The container for [docker.elastic.co/beats/elastic-agent:8.5.0](http://docker.elastic.co/beats/elastic-agent:8.5.0) keeps restarting and the only log is:

```auto
/usr/local/bin/docker-entrypoint: line 14: exec: elastic-agent: not found

```

The code for my docker compose is:

```auto
version: "3.8"
services:
...
  fleet-server:
    image: docker.elastic.co/beats/elastic-agent:8.5.0
    user: elastic-agent
    environment:
      FLEET_SERVER_ENABLE: "true"
      FLEET_SERVER_SERVICE_TOKEN: <token>
      FLEET_SERVER_ELASTICSEARCH_HOST: http://{{ elk_elastic_host }}:{{ elk_elastic_port }}
      FLEET_SERVER_POLICY_ID: "fleet-server-policy"
    networks:
      - elastic
    deploy:
      labels:
        - com.df.notify=true
        - com.df.distribute=true
        - com.df.servicePath=/
        - com.df.port={{ elk_fleet_port }}
        - com.df.srcPort={{ elk_fleet_src_port }}
...

```

Even when I follow Elastics' own [documentation](https://www.elastic.co/guide/en/fleet/current/elastic-agent-container.html#agent-in-container-self) I get the same error!

Any help would be great as at this point I ready to give up on ELK!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2022, 10:44am UTC](https://discuss.elastic.co/t/elastic-agent-not-fond-when-running-in-docker/318948/2 "2022-12-13T10:44:53Z")

</div>

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