From 38a70df668c72fdaeb774170415ebb59e9834d8a Mon Sep 17 00:00:00 2001 From: Joan Goyeau Date: Wed, 5 Feb 2020 13:34:22 -0800 Subject: [PATCH] Fix dockerPackageMappings to be absolute paths --- .../com/typesafe/sbt/packager/docker/DockerPlugin.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala index a4889deb0..2e796c3db 100644 --- a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala @@ -1,6 +1,7 @@ package com.typesafe.sbt.packager.docker import java.io.File +import java.nio.file.Paths import java.util.UUID import java.util.concurrent.atomic.AtomicBoolean @@ -251,7 +252,9 @@ object DockerPlugin extends AutoPlugin { validateDockerVersion(dockerApiVersion.value), validateDockerPermissionStrategy(dockerPermissionStrategy.value, dockerVersion.value, dockerApiVersion.value) ), - dockerPackageMappings := MappingsHelper.contentOf(sourceDirectory.value), + dockerPackageMappings := MappingsHelper + .contentOf(sourceDirectory.value) + .map { case (from, to) => from -> Paths.get("/", to).toString }, dockerGenerateConfig := { val _ = validatePackage.value generateDockerConfig(dockerCommands.value, stagingDirectory.value)