These are chat archives for sbt/sbt

1st
May 2017
Brian Topping
@briantopping
May 01 05:50
Anyone building docker images with an SBT plugin? Is it fair to say that sbt-docker plugin is easier to use but less powerful than sbt-native plugin with the docker extensions?
Shane Delmore
@ShaneDelmore
May 01 06:33
I use sbt-docker. Works great. In what way would it be less powerful?
Loki Coyote
@lokkju
May 01 08:10
The only thing that irritates me about sbt-native for docker images is it's ordering of dockerfile commands, by default, makes you drop privs. I just use it with my own cmds, and it works great. Using it with AWS ECS repositories regularly.
I went with sbt-native because I'm already using it for fatjar creation of spark jobs, and service installer wrappers.
Jeffrey Olchovy
@jeffreyolchovy
May 01 11:43
@briantopping I think sbt-docker is more powerful than sbt-native-packager. It gives you a both a mutable and an immutable builder-like pattern for building your Dockerfile. Essentially, you are in total control of its contents.
Jeffrey Olchovy
@jeffreyolchovy
May 01 11:50
It probably doesn't give you a nicer out of the box experience, but for me, personally, I prefer starting from the blank slate. For a trivial JVM app you can do:
dockerfile in docker := Dockerfile.empty
      .from("java")
      .add((fullClasspath in Compile).value.files, "/app/")
      .entryPoint("java", "-cp", "/app:/app/*", (mainClass in Compile).value.get, "$@")
Justin Leider
@jleider
May 01 14:23
Does anyone know how to prevent two separate projects (play and scalatra) with different build.sbt files which both dependOn a shared project from stomping on each other while compiling or updating? It seems like updating the target directory of the shared project depending on where it was being dependedOn from would do the trick but SBT doesnt give you any way from a ProjectRef to update the subproject's settings.
G. Richard Bellamy
@rbellamy
May 01 16:55
@briantopping I prefer to work with just the sbt-native-packager because my docker builds are pretty straightforward...
I like what @jeffreyolchovy said about sbt-docker - in my opinion, the builder patterns it provides are more legible than what you get with sbt-native-packager...
Can anyone describe to me a scenario in which I would have to have BOTH aggregate AND dependsOn?
and yes, this is related to my request for example using both flyway and slick codegen from inside SBT
I just noticed something - this gitter channel is only showing activity from 2015
(on the right, under the people list)
G. Richard Bellamy
@rbellamy
May 01 17:00
that's gotta be a gitter bug?
Brian Topping
@briantopping
May 01 17:02
hi @ShaneDelmore, @lokkju, @jeffreyolchovy, @rbellamy, thanks for all the insights, very helpful! I actually started with sbt-docker, but I'm looking at the handling of launcher scripts. For instance, if one wants to create a container from images that include your own app and cassandra, how to make it so they can be mixed and matched. I guess I could create a hierarchical script launcher that sublaunched everything in a subdirectory, picking up each image in turn
G. Richard Bellamy
@rbellamy
May 01 17:03
@briantopping use sbt-native-packager for the launcher "stuffs" then choose your poison for docker...
Brian Topping
@briantopping
May 01 17:03
right, that's sounding perfect :)
nexus3 is really providing the muscle behind this, the docker images contain JVM and NPM images that are rolled up to docker and... wow
just waking up after 3am local time last night, this stuff is a huge thrill
Brian Topping
@briantopping
May 01 17:11
@jleider sorry to trample your request there...
Justin Leider
@jleider
May 01 17:57
It doesnt seem like anyone has any ideas anyway...
G. Richard Bellamy
@rbellamy
May 01 19:33
If anyone has an example where the flyway SBT plugin tasks are wired up to run before a slick codegen task, which in turn are wired up to run before tests (either test or it), and compile, I would love to see it...