Skip to content

Commit 9a1ad1e

Browse files
committed
Merge pull request #588 from sjeandeaux/master
Use docker on windows #573
2 parents 403d286 + f521679 commit 9a1ad1e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala

+7-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ object DockerPlugin extends AutoPlugin {
5757

5858
import autoImport._
5959

60+
/**
61+
* The separator for makeAdd force UNIX separator.
62+
* The separator doesn't depend to OS where i build Dockerfile.
63+
*/
64+
val UnixSeparatorChar = '/'
65+
6066
override def requires = universal.UniversalPlugin
6167

6268
override lazy val projectSettings = Seq(
@@ -149,7 +155,7 @@ object DockerPlugin extends AutoPlugin {
149155
* @return ADD command adding all files inside the installation directory
150156
*/
151157
private final def makeAdd(dockerBaseDirectory: String): CmdLike = {
152-
val files = dockerBaseDirectory.split(java.io.File.separator)(1)
158+
val files = dockerBaseDirectory.split(UnixSeparatorChar)(1)
153159
Cmd("ADD", s"$files /$files")
154160
}
155161

0 commit comments

Comments
 (0)