# orchard-datadog-agent

## Overview

This is a wrapper Docker image that runs the Datadog Agent container without specifying `DD_API_KEY` as an environment variable in plaintext.

This image is used as a sidecar container for ECS, so the `DD_API_KEY` environment variable can be passed as a reference to a SecretsManager secret.

## Bumping Versions

We have hardcoded a specific datadog agent tag to better control when updates occur, as well as to add a label to the container to make it easier to determine the version of the datadog agent that is running in production.

When updating please stick with 7.X. DataDog Agent Version release notes can be found here: https://github.com/DataDog/datadog-agent/releases

## Update DataDog agent on Dev environment

Create ECR repository:

```bash
aws ecr create-repository --repository-name=orchard-datadog-agent --image-scanning-configuration scanOnPush=true
```

Build and publish Docker:

```bash
docker build -t orchard-datadog-agent:local . \
  && docker tag orchard-datadog-agent:local 103233932089.dkr.ecr.us-east-1.amazonaws.com/orchard-datadog-agent:latest \
  && docker push 103233932089.dkr.ecr.us-east-1.amazonaws.com/orchard-datadog-agent:latest
```
