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)