I'm running a docker container and mounting a volume which needs to be accessed from inside the container and it fails with the below error.
docker run -it -p 8080:8080 -p 29418:29418 -e CANONICAL_WEB_URL=http://ec2-18-21-19-32.us-east-2ompute.amazonaws.com:8080 \
> -v '/home/gerrit/gerrit_instance/gerrit_vol/etc:/var/gerrit/etc' \
> --env CANONICAL_WEB_URL=http://ec2-18-219-190-32.us-east-2.compute.amazonaws.com:8080 gerritimage
error: could not lock config file /var/gerrit/etc/gerrit.config: Permission denied
Docker installed on Ubuntu
If i run this image without the volume it works perfectly. The instant i want to add my custom file this error is reported.
In the container these files are populated automatically with the init script
Link followed to build and execute the file
docker pull gerritcodereview/gerrit https://github.com/GerritCodeReview/docker-gerrit
The steps are identical and i'm just uploading the etc directory which needs to be mounted to the gerrit container.
Any help is greatly appreciated.
Thank you, Anish