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 Build Fail #310

Closed
feeell opened this issue Jul 30, 2014 · 3 comments
Closed

Docker Build Fail #310

feeell opened this issue Jul 30, 2014 · 3 comments

Comments

@feeell
Copy link

feeell commented Jul 30, 2014

I tried using the docker:publish task. When I reach the docker build part, I get the following error...

[info] Done packaging.
[error] flag provided but not defined: --force-rm
[error] Usage: docker build [OPTIONS] PATH | URL | -
[error] Build a new container image from the source code at PATH
[error]   --no-cache=false: Do not use cache when building the image
[error]   -q, --quiet=false: Suppress the verbose output generated by the containers
[error]   --rm=true: Remove intermediate containers after a successful build
[error]   -t, --tag="": Repository name (and optionally a tag) to be applied to the resulting image in case of success
java.lang.RuntimeException: Nonzero exit value: 2
    at com.typesafe.sbt.packager.docker.DockerPlugin$class.publishLocalDocker(DockerPlugin.scala:105)
    at com.typesafe.sbt.SbtNativePackager$.publishLocalDocker(PackagerPlugin.scala:11)
    at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$dockerSettings$14.apply(DockerPlugin.scala:178)
    at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$dockerSettings$14.apply(DockerPlugin.scala:177)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)
    at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
[error] (docker:publishLocal) Nonzero exit value: 2

I am using Docker 0.9.1, sbt-native-packager 0.7.4. I guess the problem is the flag --rm=true is no longer used in the newer versions of Docker.

@muuki88
Copy link
Contributor

muuki88 commented Jul 30, 2014

I'm using docker 1.0.1 and the simple docker tests are running for me.
Can you provide a small example (build.sbt should be enough) so we can
try to reproduce?

@feeell
Copy link
Author

feeell commented Jul 31, 2014

sorry my bad I updated docker to 1.1.2 and it's working fine now.

@feeell feeell closed this as completed Jul 31, 2014
@muuki88
Copy link
Contributor

muuki88 commented Jul 31, 2014

Thanks for sharing. We should update the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants