You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sbt docker:publishLocal should work with a source code which has some files under src/docker path
Actual behaviour
sbt docker:publishLocal fails with the following error:
[info] Step 5/15 : COPY opt /opt
[error] COPY failed: stat /var/lib/docker/tmp/docker-builder390126844/opt: no such file or directory
[error] java.lang.RuntimeException: Nonzero exit value: 1
[error] at com.typesafe.sbt.packager.docker.DockerPlugin$.publishLocalDocker(DockerPlugin.scala:622)
[error] at com.typesafe.sbt.packager.docker.DockerPlugin$.$anonfun$projectSettings$53(DockerPlugin.scala:250)
[error] at com.typesafe.sbt.packager.docker.DockerPlugin$.$anonfun$projectSettings$53$adapted(DockerPlugin.scala:242)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (Docker / publishLocal) Nonzero exit value: 1
Information
What sbt-native-packager are you using DockerPlugin from sbt-native-packager version 1.7.3
What sbt version
sbt version 1.3.4
What is your build system (e.g. Ubuntu, MacOS, Windows, Debian )
Ubuntu 20.04
What package are you building (e.g. docker, rpm, ...)
docker
What version has your build tool (find out with e.g. rpm --version) docker version outputs:
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:25:46 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:24:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
What is your target system (e.g. Ubuntu 16.04, CentOS 7)
Ubuntu 20.04
I just ran into this. What works is to put things in src/docker/opt/docker/. For example, src/docker/opt/docker/conf/application.conf will be copied to /opt/docker/conf/application.conf in the docker image.
What's the desired behavior here? To copy everything from src/docker into the root of the image?
Expected behaviour
sbt docker:publishLocal
should work with a source code which has some files undersrc/docker
pathActual behaviour
sbt docker:publishLocal
fails with the following error:Information
DockerPlugin
from sbt-native-packager version1.7.3
sbt version
1.3.4
Ubuntu 20.04
docker
rpm --version
)docker version
outputs:Ubuntu 20.04
Added a simple reproduction at https://github.com/hackcave/sbt-native-packager-docker-issue-1348
The text was updated successfully, but these errors were encountered: