sbt-kind is a sbt plugin that loads built Docker images for your project into a kind cluster for local development.
- sbt
- kind
- Docker (soft dependency)
- sbt-docker plugin (recommended)
Add sbt-kind as a dependency in project/plugins.sbt
:
addSbtPlugin("org.cmoran" % "sbt-kind" % "0.1.0")
Enable the plugin:
lazy val `project-module` = (project in file("."))
.enablePlugins(KindPlugin)
The below settings will attempt to use your username as the cluster as well as upload all docker images made by the current build of the project.
import scala.sys.process._
val commonKindSettings = Seq(
kind / clusterName := ("whoami" !!).strip,
kind / dockerImageNames := (docker / imageNames).value.map(_.toString()),
)
addCommandAlias("publishKind", "clean; test; docker; kind; ")
$ sbt publishKind