Skip to content

Commit

Permalink
Merge pull request quarkusio#9704 from geoand/jib-cleanup
Browse files Browse the repository at this point in the history
Apply minor cleanup to JibProcessor when building fast-jar
  • Loading branch information
geoand authored Jun 1, 2020
2 parents a57ad24 + 6ff99de commit 6e9cbd8
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import io.quarkus.deployment.pkg.builditem.JarBuildItem;
import io.quarkus.deployment.pkg.builditem.NativeImageBuildItem;
import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem;
import io.quarkus.deployment.pkg.steps.JarResultBuildStep;
import io.quarkus.deployment.pkg.steps.NativeBuild;

public class JibProcessor {
Expand Down Expand Up @@ -260,11 +261,13 @@ private JibContainerBuilder createContainerBuilderFromFastJar(JibConfig jibConfi
try {
return Jib.from(toRegistryImage(ImageReference.parse(jibConfig.baseJvmImage), jibConfig.baseRegistryUsername,
jibConfig.baseRegistryPassword))
.addLayer(Collections.singletonList(componentsPath.resolve("lib")), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve("boot-lib")), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve("quarkus-run.jar")), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve("quarkus")), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve("app")), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.LIB)), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.BOOT_LIB)),
workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.QUARKUS_RUN_JAR)),
workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.QUARKUS)), workDirInContainer)
.addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.APP)), workDirInContainer)
.setWorkingDirectory(workDirInContainer)
.setEntrypoint(entrypoint)
.setEnvironment(jibConfig.environmentVariables)
Expand Down

0 comments on commit 6e9cbd8

Please sign in to comment.