操作系统信息
Ubuntu22.04,4C/16G
Kubernetes版本信息
microk8s v1.28.14
kubesphere v4.1.2
DevOps v1.1.1
流水線中執行docker run指令報錯docker not found ,改用podman一樣報錯
+ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
/home/jenkins/agent/workspace/testmsv4p/maven@tmp/durable-56b0169a/script.sh: line 1: docker: command not found
script returned exit code 127
我的Jenkinsfile:
pipeline {
agent {
label 'maven'
}
stages {
stage('Clone Repository') {
steps {
container('maven') {
git 'https://github.com/dockur/windows.git'
sh 'docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows'
}
}
}
}
}