Docker image for Phan
Inspired by cloudflare/docker-phan and mre/docker-php-phan.
The easiest way to use docker-phan
is to create a shell function for “phan”
that makes makes it nearly transparent that phan is running inside Docker.
phan() { docker run -v $PWD:/mnt/src --rm -u "$(id -u):$(id -g)" smartapps/phan:latest $@; return $?; }
If you’re just getting started with Phan, you should follow Phan’s excellent [Tutorial for Analyzing A Large Sloopy Code Base][phan-tutorial] to setup the initial configuration for your project.
All of Phan’s command line flags can be passed to docker-phan
.
To create an “analysis.txt” in the current directory for farther processing
phan -po analysis.txt