-
Notifications
You must be signed in to change notification settings - Fork 443
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 packaging fails under Ubuntu 18.04.3 LTS #1258
Comments
@cyrilfr Could you print out the exact error output you're seeing on sbt, as well as the output of |
@eed3si9n sure:
|
I think there's a bug in validation logic. Docker 17.05.0-ce allows multi-stage, but doesn't have The workaround would be to put: import com.typesafe.sbt.packager.docker._
ThisBuild / dockerPermissionStrategy := DockerPermissionStrategy.None // or DockerPermissionStrategy.Run or upgrade to more recent Docker. |
I upgraded my Docker version:
I then pass the
I set |
I still experience the issue on another PC:
|
This seems to be a permission error.
You try to install something, but you aren't allowed to. I'm not too familiar with docker, but I guess the intermediate image is not executed with the proper user. In the logs you see that all the installation stuff is done as |
The user is set using Here is my build.sbt:
It used to work perfectly with SBT native packager 1.3.5. |
Thanks for the details. The issue is as I described a bit quirky before that you append the additional RUN commands, while you must add them in the first image. dockerCommands ++= {
val currentDockerCommands = dockerCommands.value
currentDockerCommands.flatMap {
case cmd @ Cmd("FROM", _ , "as", "mainstage") => cmd ++ Seq(
ExecCmd("RUN", "apk", "add", "openjdk11-jre", "nfs-utils", "ca-certificates", "ttf-freefont", "tzdata"),
ExecCmd("RUN", "cp", "/usr/share/zoneinfo/Europe/Zurich", "/etc/localtime")
)
case cmd => List(cmd)
}
} or something like that. I did not try this out |
Thanks for the snippet, I'm not a Scala crack. IntelliJ says on Maybe this annotation in SBT code source has something to do with this? The compiler says:
|
I've been able to fix this error with:
Thanks a lot! |
Ah! Yes, your code looks much better 😄 |
I experience the same issue with
Is it still related to the Docker version detection?
The text was updated successfully, but these errors were encountered: