This is a Docker image for Pyflame. This image runs with a base of Python:2.7/3.5/3.6 making it extremely convinient for development environment.
This image can also be found on Docker Hub.
docker run -it --cap-add SYS_PTRACE -v "$(pwd):/pyflame" msoedov/pyflame:2.7 bash
pyflame <PID> | flamegraph.pl > myprofile.svg
Note: --cap-add SYS_PTRACE
is required and denied by default within Docker images
This is the bare minimum needed to use this image. Although further customization is made easier with a docker-compose file.