Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile and Dockerhub deployment for easy Windows execution #229

Open
chr15t0ph opened this issue Jan 10, 2022 · 2 comments
Open

Dockerfile and Dockerhub deployment for easy Windows execution #229

chr15t0ph opened this issue Jan 10, 2022 · 2 comments

Comments

@chr15t0ph
Copy link

Hi! Thank you for your great tool!

Could you please add a Dockerfile to your repository? And deploy latest versions to docker, e.g., as ejwa/gitinspector:latest.
The last version on Dockerhub is from Felix Hummel in version 0.4.4 and I would like to get the current version!

This Dockerfile could be used as template for you:

FROM python:2-alpine3.7

ENV PYTHONIOENCODING=utf-8

RUN apk add --no-cache git \
 && apk add --no-cache tree

ADD gitinspector/ /tmp/gitinspector/gitinspector/
ADD DESCRIPTION.txt /tmp/gitinspector/
ADD setup.py /tmp/gitinspector/

WORKDIR /tmp/gitinspector
RUN python setup.py install

WORKDIR /
RUN rm -r /tmp/gitinspector

WORKDIR /repo

ENTRYPOINT ["gitinspector"]

Use Case

I am a lecturer in a Windows environment, applying gitinspector to support grading. I will use docker to easily run gitinspector under windows (currently with felix/gitinspector:0.4.4). I give you an example execution (with the Dockerfile from above, respecting the set workdir and entrypoint):

In the example, I assume that you would deploy to Dockerhub as ejwa/gitinspector:latest and use that one (instead of the felix/gitinspector:0.4.4 one):

docker run --rm -v C:\scm\2021WS-TeamGruen:/repo ejwa/gitinspector:latest --format=html --grading -L --file-types=java,cs,c,cc,cpp,h,hh,hpp,glsl,php,py,pl,scala,rb,js,ts,vue,ml,mli,hs,po,pot,sql,html,htm,css,scss,sass,xml,jsp,jspx,ipynb,doc,docx,xls,xlsx,txt,md,tex,bib,*,marker,yml,cmd,bat,sh,sln,csproj,conf,iml,yaml,template,jsx -x file:package-lock.json -x "file:.cls$" -x file:assets -x file:node_modules --since="10.10.2021" > "C:\scm\2021WS-TeamGruen_gitinspector.html"
@adam-waldenberg
Copy link
Member

Thanks. When I have time I might look into this.

@DmytroSokhach
Copy link

In my case I've got warning:

warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your diff.renameLimit variable to at least 656 and retry the command.

and had to add:

RUN git config --global merge.renamelimit 0
RUN git config --global diff.renamelimit 0

Built with:

docker build -f ./gitinspector.Dockerfile -t gitinspector:local .

Command used for TypeScript/React project:

$ repo_full_path=~/pj/myrepo
$ docker run --rm -v $repo_full_path:/repo gitinspector:local --format=html --grading --since="01.03.2020" --file-types=ts,tsx > foo.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants