Add network option for image building
This commit adds configuration to the Maven and Gradle plugins to allow specifying the network mode to be provided to the image building goal and task. See gh-27486
This commit is contained in:
committed by
Scott Frederick
parent
e737388f5c
commit
8e6d03b221
@@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
* @author Andy Wilkinson
|
||||
* @author Scott Frederick
|
||||
* @author Andrey Shlykov
|
||||
* @author Jeroen Meijer
|
||||
*/
|
||||
class BootBuildImageTests {
|
||||
|
||||
@@ -278,4 +279,10 @@ class BootBuildImageTests {
|
||||
.containsExactly(Binding.of("host-src:container-dest:ro"), Binding.of("volume-name:container-dest:rw"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenNetworkIsConfiguredThenRequestHasNetwork() {
|
||||
this.buildImage.setNetwork("test");
|
||||
assertThat(this.buildImage.createRequest().getNetwork()).isEqualTo("test");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user