Skip to content

Commit

Permalink
Fix docker-compose integration installation doc
Browse files Browse the repository at this point in the history
When installing the agent on my personal host, using docker-compose, I used the provided snippet, but it was not working.

This PR add `privileged: true` to allow collection of other containers data.
In the [Docker agent installation doc](https://docs.datadoghq.com/agent/docker/?tab=standard) it states that agent should be run with `--cgroupns host`, which is `privileged: true` in compose.

I wanted to change `build: datadog` which is supposed to be used to build a local container to `image: datadog/agent` which pulls the image from docker repository, but did not.
I'm balanced between the "it works out of the box" approach (`image: datadog/agent`) and the "in the real world you will customise it anyway" one (`image:` + `Dockerfile`).
  • Loading branch information
themouette authored and hestonhoffman committed Jul 6, 2022
1 parent 7dc8899 commit ecaeeb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/en/agent/guide/compose-and-the-datadog-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ services:
image: redis
datadog:
build: datadog
privileged: true
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_SITE={{< region-param key="dd_site" >}}
Expand Down Expand Up @@ -80,6 +81,7 @@ services:
com.datadoghq.ad.logs: '[{"source": "redis", "service": "redis"}]'
datadog:
build: datadog
privileged: true
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_SITE={{< region-param key="dd_site" >}}
Expand Down

0 comments on commit ecaeeb0

Please sign in to comment.