fix(jenkins): replace docker.sock with containerd.sock for K3s compatibility

This commit is contained in:
2026-02-25 10:38:07 +00:00
parent f1fdae8dd7
commit 9d1b609dc0

View File

@@ -26,7 +26,7 @@ spec:
echo "Installing Docker CLI..." echo "Installing Docker CLI..."
cp /usr/local/bin/docker /tmp/tools-bin/ cp /usr/local/bin/docker /tmp/tools-bin/
chmod +x /tmp/tools-bin/docker chmod +x /tmp/tools-bin/docker
echo "Docker CLI installed" echo "Docker CLI installed"
volumeMounts: volumeMounts:
- name: tools-bin - name: tools-bin
mountPath: /tmp/tools-bin mountPath: /tmp/tools-bin
@@ -39,7 +39,7 @@ spec:
echo "Installing kubectl..." echo "Installing kubectl..."
wget -q -O /tmp/tools-bin/kubectl "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl" wget -q -O /tmp/tools-bin/kubectl "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl"
chmod +x /tmp/tools-bin/kubectl chmod +x /tmp/tools-bin/kubectl
echo "kubectl installed" echo "kubectl installed"
ls -lh /tmp/tools-bin/ ls -lh /tmp/tools-bin/
volumeMounts: volumeMounts:
- name: tools-bin - name: tools-bin
@@ -54,7 +54,7 @@ spec:
- name: JENKINS_OPTS - name: JENKINS_OPTS
value: "--httpPort=8080" value: "--httpPort=8080"
- name: DOCKER_HOST - name: DOCKER_HOST
value: "unix:///var/run/docker.sock" value: "unix:///var/run/containerd.sock"
command: command:
- sh - sh
- -c - -c
@@ -68,7 +68,7 @@ spec:
- name: jenkins-home - name: jenkins-home
mountPath: /var/jenkins_home mountPath: /var/jenkins_home
- name: docker-sock - name: docker-sock
mountPath: /var/run/docker.sock mountPath: /var/run/containerd.sock
- name: tools-bin - name: tools-bin
mountPath: /tmp/tools-bin mountPath: /tmp/tools-bin
volumes: volumes:
@@ -77,7 +77,7 @@ spec:
claimName: jenkins-home claimName: jenkins-home
- name: docker-sock - name: docker-sock
hostPath: hostPath:
path: /var/run/docker.sock path: /run/k3s/containerd/containerd.sock
type: Socket type: Socket
- name: tools-bin - name: tools-bin
emptyDir: {} emptyDir: {}