I would like to run the Jenkins in the docker. However, the default workspace for jenkins in docker is /var/jenkins_home. When I trying to get the build.xml file to invoke ant for the freestyle project, the working directory is not found. Is there any solution for this?
Error code in Jenkins (running in Docker):
Running as SYSTEM Building in workspace /var/jenkins_home/workspace/DataDrivenZoho ERROR: Unable to find build script at D:\Documents\Eclipse Project\Data_Driven_Zoho_v1\build.xml Finished: FAILURE
I have used the following command to build the jenkins in the docker container:
docker run -p 8080:8080 -p 50000:50000 -v c:/AAES/JenkinsWinHome:/var/jenkins_home jenkins/jenkins (File sharing for c:/AAES/JenkinsWinHome has been enabled in Docker Desktop for Windows)
Is there anyone can help me on this issue? Thanks in advance