Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.01 KB

README.md

File metadata and controls

47 lines (37 loc) · 1.01 KB

gitstats Docker image

Forked from https://github.com/dmitryn/GitStats to package gitstats in a Docker image with Python 2 and all other prerequisites.

Docker image: jk4ger/gitstats

See the original README for documentation of gitstats itself.

Usage

Run with Docker:

# Path to git repository.
REPO_DIR=$(pwd)

# Path to output directory.
OUTPUT_DIR="$(pwd)/out"

# Run with the current user, to ensure that the output files
# are owned by the user and not by root.
CONTAINER_USER=$(id -u):$(id -g)

# Generate report in output directory.
docker run \
  -v "$REPO_DIR:/repo:ro" \
  -v "$OUTPUT_DIR:/out" \
  --user $CONTAINER_USER \
  --rm \
  jk4ger/gitstats:latest
  
# Open report in browser.
xdg-open "$OUTPUT_DIR/index.html"

Development

Prerequisites:

  • Docker
  • GNU make

Build the Docker image locally and run on this repository with output to ./out:

make run

Run smoke test:

make test