I am new to docker. I would like to create an image which will run as part of my project build to check commited files.
My requirement is, Docker file should have these statements
- Get commited files from current git repo
- COPY myapp/ /app
- CMD /app/entry.pl
<git files>(as command line arg)
I would like to create an image for this process.
I should get the git commited files list from current local repo and pass those files to my application to scan those files.
While building my image I just need to copy my application but while running the container I need to run git diff to find changed files and pass that to my application as arguments.
Is it possible to run git diff by docker container?
UPDATE:
I tried to execute git diff on current repo from docker but it is saying not a git repository.
I am running my docker images as part of continuous integration in gitlab yml file.
Please help me to achieve this requirement?