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
@@ -169,6 +169,14 @@ Where `<options>` can contain:
|
||||
| `--publishImage`
|
||||
| Whether to publish the generated image to a Docker registry.
|
||||
| `false`
|
||||
|
||||
| `network`
|
||||
| `--network`
|
||||
| The network the build container will connect to. The value supplied for this option will be passed
|
||||
unvalidated as `HostConfig.NetworkMode` to the configuration which creates the build container,
|
||||
see https://docs.docker.com/engine/api/v1.41/#operation/ContainerCreate[Docker's engine API].
|
||||
Using this option is similar to running `docker build --network ...`.
|
||||
|
|
||||
|===
|
||||
|
||||
NOTE: The plugin detects the target Java compatibility of the project using the JavaPlugin's `targetCompatibility` property.
|
||||
|
||||
Reference in New Issue
Block a user