'jenkins : pushing time don't end

i'm using jenkins to create and push docker image to my dockerhub but it won't end . this is the build messages :

  • docker push tfkben/ben:latest

The push refers to repository [docker.io/tfkben/ben]

6566a4d0bf15: Preparing

b38a79940971: Preparing

eeb485ca5d22: Preparing

a7934564e6b9: Preparing

1b7cceb6a07c: Preparing

669dd9f17db8: Waiting

6ffff9a7048b: Waiting

b274e8788e0c: Preparing

78658088978a: Preparing

78658088978a: Waiting

b274e8788e0c: Waiting

1b7cceb6a07c: Waiting

765848bb4b15: Mounted from library/python

2e58136ef4a6: Retrying in 5 seconds

2e58136ef4a6: Retrying in 4 seconds

eeb485ca5d22: Pushed

2e58136ef4a6: Retrying in 3 seconds

this is my pipeline script :

pipeline {
    agent any
    options { buildDiscarder(logRotator(numToKeepStr:'5'))}
    environment {DOCKERHUB_CREDENTIALS = credentials('tfkben-dockerhub')}
    stages {
            stage('build'){  steps {  sh 'docker build -t tfkben/ben:latest .' }  }
            stage('Login'){  steps {  sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin ' }}
            stage('Push'){  steps {  sh 'docker push tfkben/ben:latest'}   }                                 
         }                           
            post { always { sh 'docker logout' }}
}

my dockerfile :

FROM python:3.11-rc-bullseye

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

CMD [ "python3", "manage.py", "runserver", "0.0.0.0:8000"]

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source