An sbt plugin that builds and pushes Docker images directly from your Scala project.
sbt-docker is an sbt plugin that enables developers to build and push Docker images directly from their Scala projects. It integrates seamlessly with the sbt build tool, providing a DSL for defining Dockerfiles and automating container image creation, reducing the need for external scripts and manual Dockerfile management.
Scala developers using sbt as their build tool who need to containerize their applications, particularly those working on JVM-based projects that require consistent Docker image builds as part of their CI/CD pipeline.
Developers choose sbt-docker because it deeply integrates Docker image creation into the sbt workflow, offering a type-safe DSL for Dockerfile definition, support for BuildKit, and automation of artifact inclusion from sbt tasks like package or sbt-assembly, eliminating manual steps.
Create Docker images directly from sbt
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Deeply integrates Docker tasks like `docker` and `dockerPush` directly into the sbt workflow, eliminating need for external scripts as emphasized in the README's setup examples.
Provides a mutable and immutable Dockerfile class with a DSL mirroring standard Dockerfile syntax, enabling programmatic and type-safe definition within Scala code.
Automatically includes project artifacts from sbt tasks like `package` or plugins such as sbt-assembly, reducing manual file handling as shown in the artifact integration examples.
Supports BuildKit for enhanced performance, cross-platform builds (e.g., linux/arm64/v8), and configurable build options like cache control and additional arguments.
The DSL does not support all Dockerfile instructions natively; missing ones require using `.customInstruction`, a workaround admitted in the README that adds complexity.
Exclusively tied to Scala projects using sbt, making it unsuitable for multi-language codebases or teams using other build tools like Maven or Gradle.
Cross-platform builds require additional setup such as QEMU binaries, noted in the README, which adds extra steps beyond standard Docker usage.