1

I want to build an image for a plain Dockerfile text, Is there an SBT plugin that will let me specify my own docker file.

nokostar
  • 103
  • 1
  • 4

1 Answers1

3

I don't really see a need for a plugin here. The simplest way is to just create a sbt task which calls docker process in the shell. Doing so in sbt is quite simple, take a look at this answer: How to execute a bash script as sbt task?

Something like this:

lazy val yourDockerTask = taskKey[Unit]("Runs docker build")

yourDockerTask := {
  "docker build ." !
}

Then you can call the task you just created from the sbt shell.