Skip to content

Would be nice to have registryMirrors via maven plugin configuration and / or properties like -Djib.from.auth.username #4376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ahoehma opened this issue Mar 27, 2025 · 0 comments

Comments

@ahoehma
Copy link

ahoehma commented Mar 27, 2025

https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin#global-jib-configuration

I try to combine jib-maven-plugin with registry-mirrors in gitlab build / local development.

In this scenario I find the available global-config little bit "unclean".

Maybe something like this improve this:

<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>jib-maven-plugin</artifactId>
    <configuration>
      <from>
      ...
      </from>
      <to>
      ....
      </to>
      <registryMirrors>
        <registryMirror>
            <registry>registry-1.docker.io</registry>
            <mirrors>
               <mirror>
                  <id>gcr.io</id>
                  <url>mirror.gcr.io</url>
               </mirror>
               <mirror>
                  <id>company</id>
                  <url>cr.company.cloud</url>
               </mirror>
            </mirrors>
        </registryMirror>
      </registryMirrors>
    </configuration>
  </plugin>

The with properties similar to -Djib.from.auth.username .. I would like to define the auth stuff:

-Djib.registryMirror.[id].username and -Djib.registryMirror.[id].password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants