I'm using an image container that consists of a git repository, X. Every week I'm doing build & push and create a new tag for this image, and on my Jenkinsfile, I'm using the specific updated tag at each time.
What I do in my docker file is simply git clone to the repository X, and then chmod -R 777 to the whole repository.
Now I want to access this image from my build process (I'm writing it with Jenkinsfile), but when I do it and try to operate any git commands on this repository I get the following error:
could not lock config file filepath/../.git/config :permission denied
Any suggestions here?
I've provider chmod -R 777 to all files, then i'm not sure why I receive this error.
"root" is the user who performed this clone, and "root" is the user in the running slave who is trying to access this git repository. So I'm not sure if the issue is the user who cloned the repo.
My Dockerfile is as follows:
RUN yum install -y git
RUN git clone X
RUN chmod -R 777 /home/appuser/X
RUN sudo chown $(whoami) -R /home/appuser/X/.git