jdevoo/code-forensic
Image based on Silvio Montanari's code-forensics for analysis of source code repositories.
187
This image is based on Silvio Montanari's code forensics. It does not include the flog
gem required for collecting cyclomatic complexity information from Ruby code.
If you are interested in code analysis, see also
Detals on the gulp tasks and interpretation can be found on Silvio's wiki.
I use the image with a small batch that contains the common docker run commands.
This batch file expects a shared directory (here c:\Users\XYZ\code-forensic\shared) where code-forensics can access repos and persist outputs. Calling cofo sh
allows you to run git commands from within the container. Any other arguments are passed to code-forensics which will expect to find a gulpfile in the current directory. When no arguments are provided, the default task is called.
See below.
cofo.bat
@echo off
setlocal enabledelayedexpansion
set args=%*
set wd="%cd::=%"
if "%args:~-2%" == "sh" (
docker run -it --rm -v /!wd:\=/!:/root/shared --entrypoint sh jdevoo/code-forensic
) else (
docker run -it --rm -v /!wd:\=/!:/root/shared -w /root/shared -p 3000:3000 -e COMMAND_DEBUG=true jdevoo/code-forensic %*
)
set wd=
set args=
Dockerfile
FROM openjdk:8-jre-alpine
RUN apk update && apk add curl ca-certificates git subversion less nodejs-npm && npm install -g gulp-cli
WORKDIR /root
RUN npm install code-forensics
ENTRYPOINT ["gulp"]
CMD ["list-analysis-tasks"]
docker pull jdevoo/code-forensic