Jenkins Dockerfile declarative pipelines: getting the built image tag
As I understand you want to add a variable to the docker image tag, 

in this case, you have to get an environment variable from Jenkins and use it in your image label.

    pipeline {
  environment {
    registry = "docker_hub_account/repository_name"
    registryCredential = 'dockerhub'
  }
  agent any
  stages {
    stage('Building image') {
      steps{
        script {
          docker.build registry + ":$BUILD_NUMBER"
        }
      }
    }
  }
}


pleae use this URL for more info