Nothing Special   »   [go: up one dir, main page]

Skip to content

Build minimalist distroless docker images for your java applications using Mill

License

Notifications You must be signed in to change notification settings

vic/mill-docker

Repository files navigation

mill-docker

Jitpack Main workflow

A Mill module for building minimal distroless docker images from your java applications.

The generated docker image contains only your application's assembly jar and the java runtime, but no linux distribution to maintain. That means the image size is as small as it can get without actually turning your app into a native binary (with graalvm for example).

Usage

See the annotated example buildfile at example/build.sc:

Building

The main task added by this module is dockerBuild. Note if you would like to see the output produced by the docker command, be sure to use mill --interactive mode.

$ cd example
$ mill --interactive hello.dockerBuild
$ docker run -ti hello:latest world
Hello world