Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57109

Allow for tag list within docker build arguments

      As per the docker docs (here --tag), the docker build command's tag option can be specified multiple times to tag an image multiple times.

      docker build --tag org/image:t1 --tag org/image:t2 . 

          [JENKINS-57109] Allow for tag list within docker build arguments

          Phil Madden created issue -
          Phil Madden made changes -
          Description Original: As per the docker docs [--tag|https://docs.docker.com/engine/reference/commandline/build/#tag-an-image–t], the docker build command's tag option can be specified multiple times to tag an image multiple times.
          {code:java}
          docker build --tag org/image:t1 --tag org/image:t2 . {code}
          New: As per the docker docs ([(here --tag)|https://docs.docker.com/engine/reference/commandline/build/#tag-an-image%E2%80%93t], the docker build command's tag option can be specified multiple times to tag an image multiple times.
          {code:java}
          docker build --tag org/image:t1 --tag org/image:t2 . {code}
          Phil Madden made changes -
          Description Original: As per the docker docs ([(here --tag)|https://docs.docker.com/engine/reference/commandline/build/#tag-an-image%E2%80%93t], the docker build command's tag option can be specified multiple times to tag an image multiple times.
          {code:java}
          docker build --tag org/image:t1 --tag org/image:t2 . {code}
          New: As per the docker docs [(here --tag)|https://docs.docker.com/engine/reference/commandline/build/#tag-an-image%E2%80%93t], the docker build command's tag option can be specified multiple times to tag an image multiple times.
          {code:java}
          docker build --tag org/image:t1 --tag org/image:t2 . {code}

          Gaspard Petit added a comment -

          We are facing the same need; currently the work around is to push the same image multiple times with a different tag. This is not ideal since it will compare layers each time and can result in several wasted seconds.

          Ideally we'd be allowed to do

          img.push(["tag1", "tag2", "tag3"])
          

          Gaspard Petit added a comment - We are facing the same need; currently the work around is to push the same image multiple times with a different tag. This is not ideal since it will compare layers each time and can result in several wasted seconds. Ideally we'd be allowed to do img.push([ "tag1" , "tag2" , "tag3" ])

            Unassigned Unassigned
            philmadden Phil Madden
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: