Skip to content
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

fix: respects network configuration for buildx #1850

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

michaelmejaeger
Copy link
Contributor

Description

I have found that the configuration of the network (in Docker with the parameter --network) is not respected in multi-arch builds using buildx. One can configure the network as stated in the documentation, however, this has no effect on the commandline call of docker.

Cause

The reason is that the configuration of network is simply not considered.

Solution

I provided a unit tests which shows the problem and a fix that considers the configuration done via System properties, Maven properties, and in the configuration of the plugin.

@shazzerim
Copy link

this fix would help us greatly!

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.27%. Comparing base (003398e) to head (7ea6b49).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...a/io/fabric8/maven/docker/config/ConfigHelper.java 75.00% 1 Missing and 1 partial ⚠️
...io/fabric8/maven/docker/service/BuildXService.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1850      +/-   ##
============================================
+ Coverage     66.23%   66.27%   +0.04%     
- Complexity     2346     2351       +5     
============================================
  Files           174      174              
  Lines         10344    10354      +10     
  Branches       1434     1438       +4     
============================================
+ Hits           6851     6862      +11     
+ Misses         2930     2928       -2     
- Partials        563      564       +1     
Files with missing lines Coverage Δ
...io/fabric8/maven/docker/service/BuildXService.java 74.50% <75.00%> (+0.38%) ⬆️
...a/io/fabric8/maven/docker/config/ConfigHelper.java 87.83% <75.00%> (-1.56%) ⬇️

@michaelmejaeger
Copy link
Contributor Author

Hello, is there anything more that I can/should do in this PR?

@rohanKanojia
Copy link
Member

@michaelmejaeger : Could you please add small mention of these properties in documentation?

@rohanKanojia
Copy link
Member

ah, I see it's a fix, not a feature. Please ignore my previous comment.

@rohanKanojia rohanKanojia merged commit 94df38e into fabric8io:master Jan 10, 2025
19 of 23 checks passed
@rohanKanojia
Copy link
Member

@michaelmejaeger : Thanks a lot!

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

Successfully merging this pull request may close these issues.

3 participants