question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow pushing multiple tags to registries

See original GitHub issue

Description of the feature: Currently, in order to push multiple tags (of the same image) you must call jib multiple times. This is common with docker where you have the latest tag and version specific tags. I suggest there be a way to specify multiple tags within jib’s configuration.

Expected behavior:

jib {
    to {
        image = ["repo/name:tag", "repo/name:tag2", "repo2/name2:tag3"]
    }
}

Jib would handle this by building the container once and then (preferably in parallel) push the container with the given tags.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

34reactions
coollogcommented, Sep 27, 2018

Hi everyone, we have released version 0.9.11 with the multi-tag configuration (<to><tags> for Maven, and to.tags for Gradle).

Example:

<configuration>
  ...
  <to>
    ...
    <tags>
      <tag>another</tag>
      <tag>and-yet-another</tag>
    </tags>
  </to>
</configuration>

@Techtony96 @Hronom @anuraaga @mjrsnyder @jeggy @sdavids @asaikali @itzg @davinkevin @nobecutan, @GuustavoPaiva, @sureshg

8reactions
coollogcommented, Sep 27, 2018

@Hronom Yes, that is possible, although that would require changing the schema of <image> to take a <reference> and <tags> field. I’d be hesitant to do that since it makes the usual case of having a single target image reference require <to><image><reference> rather than just <to><image>.

An alternative is to have <tags> be under the <to> tag:

<to>
  <image>registry.hub.docker.com/hronom/eureka-service</image>
  <tags>
    <tag>${git.commit.id}</tag>
    <tag>${project.version}</tag>
    <tag>latest</tag>
  </tags>
</to>

UPDATE: This is currently being implemented.

Tasks:

  • Add additional tags to BuildConfiguration. #963
  • Push to the additional tags. #968
  • Build to Docker daemon with additional tags. #983
  • Make build success message also display the additional tags. #982
  • Add to.tags configuration for Gradle. #978
  • Add the same for Maven. #1026
  • Add additional tags for build to tarball?

Optimize:

  • Parallelize pushing to multiple tags. #974 #1028
Read more comments on GitHub >

github_iconTop Results From Across the Web

docker - Is it possible for image to have multiple tags?
looks like pushing the local image name assumes dockerhub - I'm using Docker desktop so i'd have to push each tag individually. is...
Read more >
docker push - Docker Documentation
Use the -a (or --all-tags ) option to push all tags of a local image. The following example creates multiple tags for an...
Read more >
Pushing and pulling images | Container Registry documentation
Required permissions; Tag the local image with the registry name; Push the ... Pushing (uploading) and pulling (downloading) images are two of the...
Read more >
Pushing a Docker image - Amazon ECR - AWS Documentation
You can push your container images to an Amazon ECR repository with the docker ... If authenticating to multiple registries, you must repeat...
Read more >
Pushing Images Using the Docker CLI - Oracle Help Center
Let's say you want to push this image to Container Registry into a repository called project01/acme-web-app with an image tag of version2.0.test, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found