Docker

byLim

Simple and easy way to distribute applications and build environments.

Lessons Learnt

Don’t let the number of unused images and containers build up as the VM will start running out of space and you will have odd errors.

Here are a couple of handy commands to help wiht the tidy up:

  • Remove all exited containers
    docker ps -a | grep 'Exited' | awk '{print $1}' | xargs docker rm

  • remove all images with no tag
    docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi

Setting up Datadog in Docker

Annoyingly the instructions for setting up Datadog is at https://app.datadoghq.com/account/settings#agent/docker but requires a login as it generates an API key for your account.

But basically the code to add to the Dockerfile should look something like:
ENV DD_API_KEY <API_KEY>

RUN bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)"

Confirm
Follow page
Suggest
Message Lim
Report link