# Tracing with DataDog Run DataDog agent locally (make sure to replace `DD_API_KEY`): ``` docker run --name dd-agent -e DD_APM_ENABLED=true -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro --net="host" -e DD_API_KEY= gcr.io/datadoghq/agent:7 ``` Connect the docker container to the network: ``` docker run --rm --net="host" order ``