Dotnet build permission denied in Docker container running Jenkins

后端 未结 3 1056
栀梦
栀梦 2021-02-20 11:12

I am trying to build a .NET application using Jenkins. The Jenkins instance is running in a Docker container.

My Jenkinsfile is as follows:

pipeline {
          


        
3条回答
  •  梦如初夏
    2021-02-20 11:25

    The issue appeared to be linked to trying to write data to the top level of the Docker container ('/').

    Adding the following to the Jenkinsfile ensures that the home directory is set and the .dotnet folder can be created in a location with correct permissions.

    environment {
       HOME = '/tmp'
    } 
    

提交回复
热议问题