-
Improvement
-
Resolution: Unresolved
-
Minor
When specifying dockerfile as agent in a jenkins pipeline e.g. :
pipeline {
agent {
dockerfile {
additionalBuildArgs '-t image_name:latest'
label 'docker'
The docker pipeline plugin executes the following to build the image:
docker build -t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e -t image_name:latest -f Dockerfile .
How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest).
Thanks a lot in advance!
[JENKINS-51544] Option to disable automatic tagging of docker images with dockerfile agents
Description |
Original:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} {{ }}} {{ }}}{{...}}{{}}} The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
New:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} ... } The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
Description |
Original:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} ... } The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
New:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} } The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
Description |
Original:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} } The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
New:
When specifying dockerfile as agent in a jenkins pipeline e.g. : {{pipeline \{}} {{ agent \{}} {{ dockerfile \{}} {{ additionalBuildArgs '-t image_name:latest'}} {{ label 'docker'}} The docker pipeline plugin executes the following to build the image: {{docker build *-t 0c5e9a24b881c7c890b38ceb89cf26c5713e2c1e* -t image_name:latest -f Dockerfile .}} How can I disable automatically tagging the image? In this case I would like to have just one tag (image_name:latest). Thanks a lot in advance! |
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
Labels | Original: agents docker pipeline pipeline-build-step-plugin tag tags | New: agents docker docker-workflow-plugin pipeline pipeline-build-step-plugin tag tags |
Assignee | Original: Andrew Bayer [ abayer ] |
I have run into this as well and would also like to be able to specify my own image name when built from a dockerfile instead of an arbitrary name. This makes it hard to manage all the images on the host.