From eaee9a5c3f953fe79c76d652e1234492dc27f3a2 Mon Sep 17 00:00:00 2001 From: MrLuje Date: Sat, 24 Jun 2023 17:48:19 +0000 Subject: [PATCH] cleanup parameters --- .../java/io/quarkus/images/modules/GraalVMModule.java | 8 ++++---- .../java/io/quarkus/images/modules/MandrelModule.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jdock/src/main/java/io/quarkus/images/modules/GraalVMModule.java b/jdock/src/main/java/io/quarkus/images/modules/GraalVMModule.java index f120e591..d309aca2 100644 --- a/jdock/src/main/java/io/quarkus/images/modules/GraalVMModule.java +++ b/jdock/src/main/java/io/quarkus/images/modules/GraalVMModule.java @@ -19,13 +19,13 @@ public class GraalVMModule extends AbstractModule { private final boolean isLegacyGraalVm; private static final String TEMPLATE = """ - --mount=type=bind,source=%s,target=/tmp/%s \\ + --mount=type=bind,source=%s,target=%s \\ tar xzf %s -C /opt \\ && mv /opt/graalvm-ce-*-%s* /opt/graalvm \\ && %s/bin/gu --auto-yes install native-image"""; private static final String NEW_TEMPLATE = """ - --mount=type=bind,source=%s,target=/tmp/%s \\ + --mount=type=bind,source=%s,target=%s \\ tar xzf %s -C /opt \\ && mv /opt/graalvm-community-openjdk-%s* /opt/graalvm"""; private final String graalvmVersion; @@ -71,13 +71,13 @@ public List commands(BuildContext bc) { String script; if (isLegacyGraalVm) { script = TEMPLATE.formatted( - artifact.path, artifact.name, // mount bind + artifact.path, "/tmp/" + artifact.name, // mount bind "/tmp/" + artifact.name, // tar graalvmVersion, // mv GRAALVM_HOME); // gu } else { script = NEW_TEMPLATE.formatted( - artifact.path, artifact.name, // mount bind + artifact.path, "/tmp/" + artifact.name, // mount bind "/tmp/" + artifact.name, // tar graalvmVersion); } diff --git a/jdock/src/main/java/io/quarkus/images/modules/MandrelModule.java b/jdock/src/main/java/io/quarkus/images/modules/MandrelModule.java index 56cfc98f..f51959cc 100644 --- a/jdock/src/main/java/io/quarkus/images/modules/MandrelModule.java +++ b/jdock/src/main/java/io/quarkus/images/modules/MandrelModule.java @@ -14,7 +14,7 @@ public class MandrelModule extends AbstractModule { private final String filename; private static final String TEMPLATE = """ - --mount=type=bind,source=%s,target=/tmp/%s \\ + --mount=type=bind,source=%s,target=%s \\ mkdir -p %s \\ && tar xzf %s -C %s --strip-components=1"""; @@ -39,7 +39,7 @@ public MandrelModule(String version, String arch, String javaVersion, String sha public List commands(BuildContext bc) { Artifact artifact = bc.addArtifact(new Artifact(filename, url, sha)); String script = TEMPLATE.formatted( - artifact.path, artifact.name, // mount bind + artifact.path, "/tmp/" + artifact.name, // mount bind MANDREL_HOME, // mkdir "/tmp/" + artifact.name, MANDREL_HOME, //tar "/tmp/" + artifact.name); //rm