Skip to content

Commit

Permalink
Allow users to specify arbitrary arguments to docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jun 7, 2023
1 parent f3bbc25 commit 4ffb662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public class DockerConfig {
@ConfigItem
public Optional<String> executableName;

/**
* Additional arbitrary arguments passed to the executable when building the container image.
*/
@ConfigItem
public Optional<List<String>> additionalArgs;

/**
* Configuration for Docker Buildx options
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ private String[] getDockerArgs(String image, DockerfilePaths dockerfilePaths, Co
dockerArgs.add("--network");
dockerArgs.add(network);
});
dockerConfig.additionalArgs.ifPresent(dockerArgs::addAll);
dockerArgs.addAll(Arrays.asList("-t", image));

if (useBuildx) {
Expand Down

0 comments on commit 4ffb662

Please sign in to comment.