• Print
  • Share
  • Dark

Docker Installation

  • Updated on 24 Jun 2018
  • 1 minute to read
  • Contributors

Installation of the Stackify agent is required on the docker host system, it should not be installed on containers. See our guide to install the Linux agent here.

Retrace works with Docker on Linux.

When installing the agent on the docker host add the  --docker argument to the installation script. This grants the agent access to view docker container stats:

wget https://s1.stackify.com/Account/AgentDownload/Linux --output-document=stackify.tar.gz && tar -zxvf stackify.tar.gz stackify-agent-install-32bit && cd stackify-agent-install-32bit && sudo ./agent-install.sh --docker --key "your_activation_key" --environment "your_environment_name"

Enabling APM for Docker Containers

To use APM on a docker container add the following arguments on container startup:

-v /usr/local/stackify:/usr/local/stackify --pid=host

Note: This creates a shared data volume between the docker host and containers at /usr/local/stackify and instructs docker to use unique pids across containers.

Example container run command:

docker run -it --pid=host -v /usr/local/stackify:/usr/local/stackify ubuntu bin/bash

Docker Swarm

If you are unable to set ‘--host=pid’ on container startup ensure that your application server has the ‘-DSTACKIFY_DOCKER_ENABLED=true’ option set. This setting goes in the same place as the -javaagent:/… portion that is required to enable our java profiler.