Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker:stage problem - no application is built #314

Closed
johnthuss opened this issue Aug 8, 2014 · 5 comments
Closed

docker:stage problem - no application is built #314

johnthuss opened this issue Aug 8, 2014 · 5 comments
Labels
bug docker universal Zip, tar.gz, tgz and bash issues

Comments

@johnthuss
Copy link

I'm testing out the new docker:stage task and having a problem. The first time I ran it, it generated the Dockerfile and a directory structure like "files/opt/docker/..." but without anything other than directories. Since then when I run it only the Dockerfile is created. If I clean first, and then do docker:stage it's not even running a compile or anything to create the application. The Dockerfile is the only thing being created.

sbt.version = 0.13.5
sbt-native-packager = 0.7.4
scala = 2.10.4
Mac OS X 10.8.5
Play 2.2.2

@muuki88
Copy link
Contributor

muuki88 commented Aug 8, 2014

Okay. The stage task should generate all files, but no image.
Can you share your build.sbt or a subset to reproduce?

@johnthuss
Copy link
Author

$ cat build.sbt

name := "my app"
version := "1.2-SNAPSHOT"
libraryDependencies ++= Seq(
  "commons-collections"       % "commons-collections"  % "3.1",
  "commons-lang"              % "commons-lang"         % "2.5",
  "com.google.guava"          % "guava"                % "13.0",
  "com.google.code.findbugs"  % "jsr305"               % "1.3.+",
  "log4j"                     % "log4j"                % "1.2.16",
  "postgresql"                % "postgresql"           % "9.1-901.jdbc3",
  "mysql"                     % "mysql-connector-java" % "5.1.22",
  "org.apache.velocity"       % "velocity"             % "1.6.3",
  "javax.mail"                % "mail"                 % "1.4.5",
  jdbc,
  anorm,
  cache
)
play.Project.playScalaSettings
packageArchetype.java_server
Packaging.settings

$ cat project/packaging.scala

import sbt._
import com.typesafe.sbt.packager.Keys._
import sbt.Keys._
import com.typesafe.sbt.SbtNativePackager._
object Packaging {
  val settings: Seq[Setting[_]] = packagerSettings ++ deploymentSettings ++ Seq(
    daemonUser in Docker := "daemon",
    maintainer in Docker := "John Huss ",
    dockerBaseImage := "dockerfile/java",
    dockerExposedPorts in Docker := Seq(9000, 9443),
    dockerExposedVolumes in Docker := Seq("/opt/docker/logs")
  )
}

@muuki88
Copy link
Contributor

muuki88 commented Aug 9, 2014

Thanks. I'll take a closer look on monday. In the meantime @fiadliel may know
some more Details.

@muuki88 muuki88 added the bug label Aug 9, 2014
@fiadliel
Copy link
Contributor

fiadliel commented Aug 9, 2014

There seems to be an issue with your build configuration, because Play already includes packaging settings.

You should not include packagerSettings, deploymentSettings or archetype.java_server - that may be overriding/removing important settings.

See also playframework/playframework#2915

I'm AFK for the week, so I can't easily find out exactly why this breaks the build right now.

@johnthuss
Copy link
Author

Thank you. Removing those parts fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docker universal Zip, tar.gz, tgz and bash issues
Projects
None yet
Development

No branches or pull requests

3 participants