Skip to content

Commit

Permalink
Merge pull request #293 from rfranco/fix-docker-commands
Browse files Browse the repository at this point in the history
fix order of docker commands
  • Loading branch information
muuki88 committed Jul 14, 2014
2 parents 209ab38 + 2c07381 commit e75f1d6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ trait DockerPlugin extends Plugin with UniversalPlugin {
val Docker = config("docker") extend Universal

private[this] final def makeDockerContent(dockerBaseImage: String, dockerBaseDirectory: String, maintainer: String, daemonUser: String, name: String, exposedPorts: Seq[Int], exposedVolumes: Seq[String]) = {
val dockerCommands = Seq(
val headerCommands = Seq(
Cmd("FROM", dockerBaseImage),
Cmd("MAINTAINER", maintainer),
Cmd("MAINTAINER", maintainer)
)

val dockerCommands = Seq(
Cmd("ADD", "files /"),
Cmd("WORKDIR", "%s" format dockerBaseDirectory),
ExecCmd("RUN", "chown", "-R", daemonUser, "."),
Expand Down Expand Up @@ -42,7 +45,7 @@ trait DockerPlugin extends Plugin with UniversalPlugin {
)
}

Dockerfile(volumeCommands ++ exposeCommand ++ dockerCommands: _*).makeContent
Dockerfile(headerCommands ++ volumeCommands ++ exposeCommand ++ dockerCommands: _*).makeContent
}

private[this] final def generateDockerConfig(
Expand Down

2 comments on commit e75f1d6

@benmccann
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance of getting a 0.7.3 released? I'm extremely interested in this fix

@muuki88
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure :) I think we will put out two releases. A binary compatible version 0.7.3 and a 0.8.0-M1 with #250
@jsuereth WDYT I rechecked #250 and I changed one setting ( unverisal:packageFilename to universal:packageName)

Please sign in to comment.