Running Datadog Agent in an app container - agent failing to start

Hello there,


I’m trying to instal the Datadog Agent in my application container. I’d like to avoid running it in a separate conainer.

I had some successful build going through, but now every build fails because the agent fails to start.

The only changes I made for installing the agent was altering my dockerfile, as such (it’s very similar to an Elixir helloworld-level Dockerfile):

# Installing packages (added curl)
# Installing the datadog agent (with the script install they provide, hosted on S3)
# Copy app source code to the workdir
# Launching the app


Now, everytime I try to deploy, I get the following error:

#8 19.70 Starting Datadog Agent: datadog-agent failed!
#8 23.72 Error starting Datadog Agent
#8 23.72 It looks like you hit an issue when trying to install the Datadog Agent.
#8 23.72 
#8 23.72 Troubleshooting and basic usage information for the Datadog Agent are available at:
#8 23.72 
#8 23.72
#8 23.72 
#8 23.84 
#8 23.84 If you are still having problems, please send an email to
#8 23.84 with the contents of ddagent-install.log and any information you think would be
#8 23.84 useful and we will do our very best to help you solve your problem.
Error: failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c DD_API_KEY=${DATADOG_API_KEY} DD_SITE="" bash -c "$(curl -L"]: exit code: 1

Installing the agent directly on the running app works. Also, building locally works (with docker build .)

Is anyone experiencing a similar issue?

Is there any way to open a terminal during a docker build started with flyctl deploy to check logs?