Questions tagged [sbt-native-packager]
The sbt Native Packager is designed to package software built with the sbt build system into native packaging systems such as msi, deb, rpm, etc.
361
questions
0
votes
2
answers
71
views
how to increase max memory usage in build.sbt
I have a
build.sbt
file that looks something like this
lazy val `tokens-service` = (project in file("modules/some-service"))
.configure(commonSettings)
.enablePlugins(...)
.settings(
...
0
votes
2
answers
85
views
How to install apt-get dependencies in Docker image using sbt-native-packager plugin [duplicate]
I am using the sbt-native-packager plugin to generate a Docker image for a Scala project. The project requires a specific package libnetcdf.so to be installed on the image.
I am using the below ...
1
vote
0
answers
347
views
Getting error Error response from daemon: failed to create shim task: OCI runtime create failed (permission denied: unknown), while creating container
I'm using Intellij Idea to create an image using docker plugin (sbt-native-packager).
Creating an Image by Running the command in sbt-shell.
sbt> docker:publishlocal
The Image created successfully(...
1
vote
1
answer
65
views
"sbt stage" does not do anything
I'm facing an issue while trying to generate a universal folder using the 'sbt stage' command. I have a Scala project with the following build.sbt file:
name := "hod.btlg"
version := "...
2
votes
1
answer
303
views
sbt native package manager custom dockerfile:E: Command line option 'O' [from -O] is not understood in combination with the other options
i have an akka-http project i am using sbt-native package manager for creating a dockerfile for it and i need to add some additional commands in my dockerfile for that i am referring to the example ...
0
votes
1
answer
324
views
Unable to make docker image using sbt-native-packager
I'm learning to make docker image of scala application using sbt-native-packager. My application contains akka-http and running fine on localhost:8080 (scala-version: 2.13.1, sbt-version: 1.2.8). Now ...
1
vote
1
answer
87
views
(Extracting structure failed: Build status: Error) Unable to import plugin to scala in plugins.sbt file
I'm trying to use sbt-native-packager to make Docker Image of scala project. I have to add sbt-native-packager plugin. For that, I've created "plugins.sbt" file in book_system_task/project/...
0
votes
0
answers
73
views
Dynamically adding jars to Docker with sbt-native-packager
How do you add jars that are created via assembly to a docker image created by sbt-native-packager, I've tried a few things but I think it may be ordering
None of these work:
mappings in Universal ...
2
votes
0
answers
51
views
SBT Dynamic Project Dependency
I recently need to integrate some projects as submodules, and each of them has its own build.sbt.
And there are also dependencies between submodules.
Therefore, I need to dynamically convert the ...
1
vote
0
answers
57
views
Set mainClass for sbt native packager Universal
I have a project that has the following build.sbt:
addCommandAlias("package", "dist")
lazy val actual = (project in file("."))
.enablePlugins(UniversalPlugin, ...
1
vote
0
answers
156
views
docker image with sbt: gc log issue
I have created a docker image using sbt-native-packager for my service. When I try to run it, I get following error:
$ docker run --name my-service -v ..../logs:/opt/docker/log/ -p 8086:8086 ...
0
votes
1
answer
56
views
sbt docker bashScriptExtraDefines: command not found
I had an issue, which I found solution for here.
So, now I have in build.sbt:
.settings(dockerEntrypoint := Seq("/opt/docker/bin/service-main"))
.settings(bashScriptExtraDefines ++= ...
-1
votes
1
answer
248
views
SBT Native Packager Add File Using Docker Command
I'm using the SBT Native Packager to add a file from the local file system to the generated Dockerfile as below:
dockerCommands += Cmd("ADD", "./data/housing.tgz /opt/docker/data/...
0
votes
0
answers
125
views
SBT native packager: reference to undefined setting Universal / mappings
I'm using the sbt-native-packager to build my Docker image and publish it to my local. I have a custom directory where I have some files that I would like to be part of the resulting Docker file ...
0
votes
0
answers
220
views
Docker Cannot Start a Container Because of bash
I'm having a Docker image which looks like below when inspected.
[
{
"Id": "sha256:e11214d50ae2bf3ec1f97171a35d1164a04198bc879284a7b4bef4600272f978",
"...
1
vote
1
answer
1k
views
Building a native image on Mac ARM64 for linux/amd64 in sbt
I'm using the sbt-native-packager plugin in sbt to generate a linux executable to be wrapped inside an alpine docker image.
Since I've switches to the new Mac arch (ARM64) this doesn't work anymore.
...
1
vote
1
answer
289
views
Which namespace is correct, "com.typesafe.sbt" or "com.github.sbt"?
www.scala-sbt.org uses the "com.typesafe.sbt" namespace for sbt-native-packager, sbt-native-packager.readthedocs.io uses the "com.github.sbt" namespace. Both sites appear to be ...
1
vote
0
answers
575
views
Add file to classpath of testcontainer in VS Code / Metals using build.sbt
I have an sbt project configured with a build.sbt. When I run tests, a docker container is started with a configuration file available. This is how I wanted to use it in the test (https://www....
0
votes
1
answer
134
views
SBT Native Packager change output location of ZIP
This is my build.sbt:
name := "DB-Services"
version := "0.1"
scalaVersion := "2.12.12"
lazy val root = (project in file(".")).enablePlugins(UniversalPlugin,...
1
vote
1
answer
1k
views
sbt-assembly - can not find main class in jar
I have a project where I am trying to create a fat jar using the sbt-assembly plugin. When I attempt to run my main class from the jar using the java -jar command, I get the error message: Error: ...
6
votes
0
answers
78
views
How to re-use an existing task in sbt but with different settings
One of the use cases I have where I want to re-use an existing task is:
Publishing a locally built docker image to a custom registry.
It would be nice if I can just re-use: Docker / publishLocal but ...
2
votes
1
answer
721
views
sbt / native-packager, new jdeps error: java.lang.module.FindException: Module java.activation not found, required by java.xml.bind
I have not changed my setup as far as I can see. As of today, trying to run sbt native packager with jlink gives this error:
[info] Running: jdeps --multi-release 11 -R ...
[error] Exception in thread ...
2
votes
0
answers
100
views
Cannot get past "paranamer" error with JlinkPlugin in sbt-native-packager
We're trying to include a minimal JDK as part of a Windows installer for a Play 2.8.8 application, using the version of sbt-native-packager included with Play.
Alas, when packaging the application, we ...
2
votes
1
answer
558
views
Play framework sbt docker:publishLocal showing Errors
I created a new project from play template https://www.playframework.com/documentation/2.8.x/NewApplication
But when i run sbt docker:publishLocal i get the below errors . However the images are ...
5
votes
2
answers
684
views
Sbt-native-packager cannot connect to Docker daemon
Here is my configuration which worked for more than one year but suddenly stopped working.
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stage: deploy
image: "...
1
vote
1
answer
301
views
How to publish Test Only Objects in a sbt project
I have been developing a common library for my team, where I need to provide mock data for end users to write unit-test code. Ideally, the mock object should only be available to tests of packages ...
0
votes
1
answer
1k
views
How to use sbt-native-packager plug-in v1.9.2 and fix "not found" error?
I'm trying to use the latest version of sbt-native-packager (v1.9.2) in a Play Framework project:
https://github.com/sbt/sbt-native-packager/tree/v1.9.2
Hence, I have added this to the project/plugins....
0
votes
0
answers
118
views
Use SBT to download / use file from URL
My goal is simple: download an external file at build-time and include it in an SBT-packaged artifact.
I have been looking or a way to fetch data based on a URL and use the local File as the source in ...
0
votes
1
answer
159
views
native-package-manager and sbt-git plugins not found on maven repo
I believe that the two plugins are not available anymore on maven central repository. I am not able to add them to the project. Everytime I get the error about unknown artifact. This has stopped ...
0
votes
0
answers
99
views
How to update latest image only during publishLocal
I would like to be able to update the latest tag when building/publishing the image locally, but not when publishing it publicly.
I added this setting:
Docker / publishLocal / dockerUpdateLatest := ...
1
vote
1
answer
182
views
Clarification on scope delegation of dockerExposedPorts with sbt-native-packager
I am using the sbt-native-packager plugin that comes with Scala Play:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.8")
I would like to know why the ...
1
vote
0
answers
155
views
SBT shell project in terminal gives error
i am a beginner at scala programming language. i read sbt documentation and implement these in sbt shell but it gives error. how to resolve it?
....................
ThisBuild / scalaVersion := "2....
1
vote
0
answers
66
views
getting fileNotFoundException when running code on docker container using sbt native-packager
i am creating a docker image of my akka http project using sbt native-packager
here is my build.sbt file
name := "myproject-auth"
version := "0.0.1"
enablePlugins(DockerPlugin)
...
0
votes
1
answer
114
views
Why is the scala-compiler.jar included as library in my artefact
When I build an artefact with
sbt universal:packageZipTarball
the scala-compiler.jar is included as a lib in my artefact.
Why is the scala-compiler needed at runtime? In my understanding it shouldn't ...
0
votes
1
answer
793
views
Conditional JavaAgent Command for SBT Native Packager
I'm using scala, sbt, sbt-native-package, and potentially sbt-java-agent to conditionally activate a datadog java agent at runtime w/ kubernetes.
By adding the dd-java-agent as a dependency and adding ...
1
vote
2
answers
2k
views
Docker tag with date no longer functions in Gitlab
Previously, I've managed to tag my latest images and push them to Gitlab container registry without any problem for months. However, I've noticed ever since yesterday that Gitlab no longer managed to ...
1
vote
1
answer
479
views
NoClassDefFoundError during runtime on application built with sbt
I have the following build.sbt file:
lazy val shared = (project in file("shared")) .
settings (moduleName := "x-shared") .
...
lazy val service = (project in file ("...
2
votes
1
answer
219
views
Multiple jars for multiple test packages in sbt
Is there any way in sbt (custom task or plugin) to pack packages in separate jars.
For example :-
In this sample project, there should be 6 jar files generated for packages eg1, eg2, eg3, eg4, eg49, ...
2
votes
1
answer
896
views
How to set the Docker Registry with sbt-native-packager
I'm trying to build a Docker image using sbt-native-packager with the following build.sbt (trying to publish the image to a local repository)
val sparkVersion = "2.4.5"
scalaVersion in ...
0
votes
1
answer
335
views
Create fat.jar + external file into a single tar.gz file to publish on my Nexus using Sbt-native-packager
I'm trying to create a single package which contains a fat.jar using sbt-assembly and After pack this with some external files present into my resources in a single file named .tar.gz, do you have ...
0
votes
1
answer
314
views
'Action not found' from production version of Play App
I'm trying to dockerize Play 2.8 Scala App. I followed instructions from documentation (https://www.playframework.com/documentation/2.8.x/Deploying) and generated target (sbt clean & sbt dist). ...
1
vote
0
answers
162
views
How to do multiple docker builds on single sbt project?
I want to have a JDK8 and JDK13 docker build using sbt. I know that I can use the dockerBaseImage settings to specify a JDK8 base image using the sbt-native-packager plugin. How can I have two ...
-1
votes
2
answers
236
views
Created scala docker image using sbt native plugin. I have to add LDAP CA cert. How to add that in the image
Scala docker plug in creates the docket image but how to add LDAP CA certificate in the image. Is there any property to set the LDAP certificate. My application requires ldap authentication during ...
1
vote
1
answer
700
views
Sbt generated docker container fails to package subproject
I have a multi-project build.sbt file, with projects like so:
lazy val utils = (project in file("utils"))
.settings(
Seq(
publishArtifact := false
)).[...]
lazy val api = (project in ...
0
votes
1
answer
577
views
using docker plugin with sbt
I am using sbt 1,3.6, jdk 11.0.6 & scala 2.13.1.
I am trying to use the sbt native packager with the docker plugin:
enablePlugins(DockerPlugin)
However, when I run sbt clean, I get the ...
2
votes
1
answer
675
views
Sbt / javaAgents / force jar-with-dependencies
I want to add "org.kohsuke" % "file-leak-detector" % "1.13" java agent to my sbt configuration.
//plugins.sbt
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
//build.sbt
...
0
votes
1
answer
72
views
Using stb-native-packager with Debian and SystemV on Play 2.6
I have upgrade from Play! 2.6 two Play! 2,6, but now I cannot get my application deployed.
I used to have
import com.typesafe.sbt.packager.archetypes.ServerLoader.SystemV
serverLoading in Debian := ...
8
votes
1
answer
13k
views
pass external config file to docker container at runtime
I have a scala sbt application and have a default application.conf.
I built a docker image to run this application via docker.
How can I replace the default application.conf in the docker container at ...
1
vote
1
answer
315
views
Play / Scala / sbt: docker:publichLocal with specific .conf file
I try in vain to deploy and run my play app from sbt-native-packager with the command "sbt docker:publishLocal" with a specific .conf-file on Docker.
The command as such works, the image is created, ...
2
votes
0
answers
82
views
How publish signed artifacts using universal:publish in SBT Native Packager
We are currently deploying to maven central at oss.sonatype.org. They require signing published artifacts. For our normal artifacts we are using sbt-gpg to sign and publish.
We use sbt-native-...