Skip to content

Commit

Permalink
Merge pull request #22282 from geoand/#22278
Browse files Browse the repository at this point in the history
Add network option to quarkus-container-image-docker configuration
  • Loading branch information
geoand authored Dec 16, 2021
2 parents 3ca1d7e + 61d62c8 commit 3c3d3ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public class DockerConfig {
@ConfigItem
public Optional<List<String>> cacheFrom;

/**
* The networking mode for the RUN instructions during build
*/
public Optional<String> network;

/**
* Name of binary used to execute the docker commands.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ private String[] getDockerArgs(String image, DockerfilePaths dockerfilePaths, Co
dockerArgs.add(String.join(",", cacheFrom));
}
}
if (dockerConfig.network.isPresent()) {
dockerArgs.add("--network");
dockerArgs.add(dockerConfig.network.get());
}
dockerArgs.addAll(Arrays.asList("-t", image));
dockerArgs.add(dockerfilePaths.getDockerExecutionPath().toAbsolutePath().toString());
return dockerArgs.toArray(new String[0]);
Expand Down

0 comments on commit 3c3d3ac

Please sign in to comment.