I am following along in a book on using Docker to set up Jenkins using volumes (yes, the book also is targeted for readers using Dockers for Windows, but not exclusively. This following command to start a container is as follows:
$ docker run --rm -d \ --name jenkins \ -u root \ -p 8080:8080 \ -v jenkins-data:/var/jenkins_home \ -v /var/run/docker.sock:/var/run/docker.sock \ -v "$HOME":/home \ jenkinsci/blueocean
The error is reported as follows:
docker: Error response from daemon: mkdir C:\Program Files\Git\var: Access is denied.
See ‘docker run --help’.
Note that I have a GitBash terminal open in admin mode. ‘echo $HOME’ gives ‘/d/dev’
My docker config I suppose is missing something that would set up Docker attachment (?) points for host-to-container volume access away from directories (folders) that Windows generally does not want applications modifying.