I have yet another issue with permissions running Docker through Jenkins declarative pipeline. I want to build and publish a Python package through a Jenkins job in a D
You can try executing it as sudo:
stage('Package') {
steps {
sh '''
python -V
sudo python -m pip install -r requirements.txt --user --no-cache
sudo python setup.py sdist
'''
}
}
You may have issues due Jenkins is not able to run command as sudo
in that case I will recommend you to follow the steps mentioned in this article or in this SO question