diff --git a/Jenkinsfile b/Jenkinsfile index 5142de2f8..ff8a76707 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,10 +37,10 @@ pipeline { post { always { script { - // Use the saved Docker image ID from the environment if needed if (env.DOCKER_IMAGE_ID) { echo "Stopping and removing Docker Image with ID: ${env.DOCKER_IMAGE_ID}" - docker.rmi(env.DOCKER_IMAGE_ID) + // Using shell command to remove Docker image + sh "docker rmi ${env.DOCKER_IMAGE_ID}" } } }