nodece opened a new pull request, #24168:
URL: https://github.com/apache/pulsar/pull/24168

   ### Motivation
   
   The `docker-maven-plugin` supports skipping Docker image tags using the 
`docker.skip.tag` property. However, it does not work correctly when building 
multi-architecture images using `buildx`. As a workaround, the plugin provides 
a `skipTag` option in the [build 
configuration](https://dmp.fabric8.io/#build-configuration), which successfully 
skips tagging in multi-arch builds/pushes.
   
   **Issue (Old behavior):**
   
   Running the following command:
   ```shell
   cd docker/pulsar
   mvn install -Pdocker -Ddocker.skip.tag=true 
-Ddocker.platforms=linux/arm64,linux/amd64
   ```
   
   Still resulted in tagging:
   ```
   --tag apachepulsar/pulsar:latest
   --tag apachepulsar/pulsar:latest
   --tag apachepulsar/pulsar:4.1.0-SNAPSHOT-e8be56d
   ```
   
   **Fixed behavior:**
   
   By using the `skipTag` configuration:
   ```
   --tag apachepulsar/pulsar:latest
   ```
   
   Only the explicitly defined tag is applied.
   
   ---
   
   ### Modifications
   
   - Explicitly set the Docker image tag using the `docker.tag` property.
   - Added `skipTag` option in the `<build>` configuration for both `pulsar` 
and `pulsar-all` images to prevent unnecessary automatic tagging during 
multi-architecture builds, default to `false`.
   - Removed the `<tags>` configuration from the test image, as no tags are 
required for it.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to