Skip to content

Commit

Permalink
Apply minor cleanup to JibProcessor when building fast-jar
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jun 1, 2020
1 parent 03d826f commit 6ff99de
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 6ff99de

Please sign in to comment.