6.371 E: The repository 'http://mirror.yandex.ru/debian bullseye Release' does not have a Release file.
6.371 E: The repository 'http://mirror.yandex.ru/debian-security bullseye-security Release' does not have a Release file.0.854 Err:4 http://deb.debian.org/debian bookworm Release
0.854   404  Not Found [IP: 146.75.118.132 80]
0.868 Err:5 http://deb.debian.org/debian bookworm-updates Release
0.868   404  Not Found [IP: 146.75.118.132 80]
0.878 Err:6 http://deb.debian.org/debian-security bookworm-security Release
0.878   404  Not Found [IP: 146.75.118.132 80]
0.902 Reading package lists...
0.946 E: The repository 'http://deb.debian.org/debian bookworm Release' does not have a Release file.
0.947 E: The repository 'http://deb.debian.org/debian bookworm-updates Release' does not have a Release file.
0.952 E: The repository 'http://deb.debian.org/debian-security bookworm-security Release' does not have a Release file.Почему?
Дженкинс в контейнере удобен, если вы запускаете его в кубере, чтобы он себе поднимал в нужный момент агенты и останавливал их. Просто так на хосте делать контейнер для дженкинса - ну можно конечно, но зачем..?
Если у вас нет оркестратора, то нет смысла пихать дженкинс в контейнер, а потом изнутри искать выход наружу к папкам и ексекуторам. То есть у вас подход какой-то неправильный.
pipeline {
    agent any  // Вы можете указать конкретный агент, если нужно
    stages {
        stage('Get Mountpoint') {
            steps {
                script {
                    // Получаем путь монтирования тома
                    sshagent(['ssh-user-credential-id']) {
                        def mountpoint = sh(script: "ssh -o StrictHostKeyChecking=no user@host 'echo password  | sudo -S docker volume inspect pipline_jenkins_home -f \"{{ .Mountpoint }}\"'", returnStdout: true).trim()
                        echo "Mountpoint: ${mountpoint}"
                        env.MOUNTPOINT = mountpoint
                    }
                }
            }
        }
        stage('Get Project Name') {
            steps {
                script {
                    // Получение имени проекта
                    def projectName = env.JOB_NAME
                    echo "The project name is: ${projectName}"
                    env.PROJECT_NAME = projectName
                }
            }
        }
        stage('Clone Repository') {
            steps {
                git 'https://github.com/traefik/whoami.git'
            
            }
        }
        stage('Build Repository') {
            steps {
                sshagent(['ssh-user-credential-id']) {
                        sh "echo ${env.MOUNTPOINT}/workspace/${env.PROJECT_NAME}"
                        sh "ssh -o StrictHostKeyChecking=no user@host 'echo password  | sudo -S docker build -t zaya ${env.MOUNTPOINT}/workspace/${env.PROJECT_NAME}'"
                }            
            }
        }  
    }
}