Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-3666 Fix docker-compose integration installation doc #14384

Merged
merged 2 commits into from Jul 8, 2022

Conversation

themouette
Copy link
Contributor

What does this PR do?

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 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).

Motivation

Additional Notes


Reviewer checklist

  • Review the changed files.
  • Review the URLs listed in the Preview section.
  • Check images for PII
  • Review any mentions of "Contact Datadog support" for internal support documentation.

@themouette themouette requested a review from a team as a code owner June 22, 2022 12:26
@github-actions github-actions bot added FAQ Content impacting a FAQ integrations Content changed in the integrations folder labels Jun 22, 2022
@buraizu buraizu changed the title Fix docker-compose integration installation doc DOCS-3666 Fix docker-compose integration installation doc Jun 23, 2022
@buraizu buraizu added the editorial review Waiting on a more in-depth review label Jun 23, 2022
@buraizu
Copy link
Contributor

buraizu commented Jun 23, 2022

Thanks, created DOCS-3666 to track this update!

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`).
@github-actions github-actions bot added agent Content changed in the Agent folder Guide Content impacting a guide labels Jul 6, 2022
@hestonhoffman hestonhoffman requested a review from a team July 6, 2022 23:39
@vboulineau
Copy link
Contributor

We don't expect our users to have to customize the datadog/agent image.

About the cgroupns host, the issue is compose-spec/compose-spec#148
Using privileged is a bit too much, better to use pid: host as a workaround (pid: host implies cgroupns: host)

@hestonhoffman hestonhoffman merged commit 3eba10d into master Jul 8, 2022
@hestonhoffman hestonhoffman deleted the themouette-patch-1 branch July 8, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Content changed in the Agent folder editorial review Waiting on a more in-depth review FAQ Content impacting a FAQ Guide Content impacting a guide integrations Content changed in the integrations folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants