0

I am trying to run gitlab ci which contains custom php image. The before_script invokes docker_install.sh In docker_isntall.sh I executed "whoami" it gives "docker". I tried to list down groups it gives "docker sudo".

When I try to execute further instrutions in docker_install.sh file, like

cp ci/php.ini /etc/php/7.4/cli/php.ini

it does not execute and gives error cp: cannot create regular file '/etc/php/7.4/cli/php.ini': Permission denied

if I do sudo cp ci/php.ini /etc/php/7.4/cli/php.ini

it executes successfully. However there are many such instruction for which I do not want to append "sudo".

What is the solution to this problem.?

Know someone who can answer?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.