I have multiple Java Applications that depend on the directory config/
at the root of each repository.
When building images of these apps with jib-maven-plugin, Jib does not copy this directory by default.
Specifying extraDirectories
works when configuring via pom.xml
as <from>
and <into>
can be set:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<extraDirectories>
<paths>
<path>
<from>./config</from>
<into>/config</into>
</path>
</paths>
</extraDirectories>
</configuration>
</plugin>
Though I'd rather configure Jib via CLI parameters.
-Djib.extraDirectories.paths=./config
works for copying all the contents of config/
to the root of the container. Though I need the files to be copied to /config/*
.
This brings me to the question whether it is possible to provide a list of objects to -Djib.extraDirectories.paths
?
As in -Djib.extraDirectories.paths={from=./config,into=/config},{from=/another/dir,into=/dir/in/image}
(whatever the right syntax would be?).