Gradle under Docker – Could not open cp_proj remapped class cache

I’ve installed Jenkins 2.6 as a docker container on a Windows 2012 Server machine.

I have created a project that checks out a project from git.

  • Memory discrepancy between Kubernetes Dashboard and actual usage
  • Docker unable to connect AWS EC2 cloud
  • Vagrant: boot2docker: Unable to find image 'drupal' locally
  • Docker Error when Starting an Image
  • Trying to build openface docker container
  • Kubernetes 1.2.2: api-server fails: can't find mounted certs for TLS on etcd
  • I’ve configured a build step that does a build using gradle wrapper 2.13

    The gradle command fails with:

    FAILURE: Build failed with an exception.
    * What went wrong:
    A problem occurred configuring root project 'test'.
    > Could not open cp_proj remapped class cache for 6f7e45oinduki44jplv0c4r9s (/var/jenkins_home/.gradle/caches/2.13/scrip
       > /var/jenkins_home/.gradle/caches/2.13/scripts-remapped/build_4xwqfk0ckitkb3fdwi5uf1f
    lass (Operation not permitted)
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    I’ve tried remoting into the container and running the gradle command manually but get the same error.

    I found an article on the internet that recommended deleting the lock files:

    This has not helped.

    I’ve also tried restarting the container but this has not helped either.

  • Can't connect to Cassandra Docker Container
  • Issue connecting to Docker plugin via unix sockets
  • Use STDIN during docker build from a Dockerfile
  • salt: several minions on one host? [closed]
  • Docker with cloudflare
  • Fails to setup docker for port number 6006 published for TensorBoard
  • One Solution collect form web for “Gradle under Docker – Could not open cp_proj remapped class cache”

    I had the same problem which at least for me was because of two reasons:

    1. My java home system variable was pointing for jdk7 instead of jdk8
    2. The proxy was blocking jCentral.


    1. For first cause the solution is pretty simple. I just pointed the JAVA_HOME for having java 8 version
    2. In the user home directory(which for me was c:/users/)/.gradle i created a file named in which I put the next settings:









    Hope this will be useful for someone else in the future.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.