Error in Jenkins on Docker Toolbox for Windows: volume permission issue?

Hello everyone,

I configured a docker-compose.yml file to obtain a Jenkins docker machine as it follows:

jenkins:
    image: jenkins/jenkins:lts
    ports:
      - "8080:8080"
      - "50000:50000"
    volumes:
      - ./jenkins_home:/var/jenkins_home

Every time I try to run a build, which is performing a checkout from a SVN location I get the following error in Jenkins:

Updating http://192.168.99.100:18080/svn/testing/trunk/WebDemo at revision '2019-01-18T10:16:43.469 +0000' --quiet
Using sole credentials jenkins/****** in realm ‘<http://192.168.99.100:18080> CollabNet Subversion Repository’
ERROR: Failed to update http://192.168.99.100:18080/svn/testing/trunk/WebDemo
org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot rename file '/var/jenkins_home/workspace/Test/.svn/tmp/entries' to '/var/jenkins_home/workspace/Test/.svn/entries'

I know this is a Jenkins error but I am almost sure it depends on something Docker related because the same Jenkins Job on my localhost machine does the checkout from SVN flawlessly and is never failing.

Could it be an issue with file or directory permission? I gave something like chmod a+rwx on the jenkins_home directory on my laptop but this doesn’t solve the issue.

EDIT:
I tried to reproduce the same, without using a volume and it works:

Building in workspace /var/jenkins_home/workspace/Test
Checking out a fresh workspace because there's no workspace at /var/jenkins_home/workspace/Test
Cleaning local Directory .
Checking out http://192.168.99.100:18080/svn/testing/trunk/WebDemo at revision '2019-01-18T11:12:29.285 +0000' --quiet
Using sole credentials jenkins/****** in realm ‘<http://192.168.99.100:18080> CollabNet Subversion Repository’
At revision 4

So, in the end, it’s something due to the volume permissions between Windows and Docker.
How to solve this?

Hi All,

I figured out the solution. As I was suspecting it was due to the volume being created in the current windows working directory.

Basically using the docker volume system solved the issue:

version: '3'

services:
  jenkins:
    image: bitnami/jenkins:latest
    ports:
      - 8080:8080
      - 8443:8443
    volumes:
      - "jenkins_data:/bitnami"
volumes:
  jenkins_data: