JVM Containers

Build a container image from a JAR or native-image artifact.

Container images are project artifacts; there is no elide container subcommand.

Declare an image

amends "elide:project.pkl"
import "elide:Jvm.pkl" as Jvm
import "elide:Container.pkl" as Container

artifacts {
  ["app"] = new Jvm.Jar {
    sources { "main" }
  }

  ["image"] = new Container.ContainerImage {
    from { "app" }
    image = "my-app"
    base = "eclipse-temurin:25-jre"
    tags { "latest" }
    output = "daemon"
  }
}
elide build

Fields

PropertyValuesDefault
fromExactly one Jvm.Jar (JVM image) or NativeImage (executable image).—
imageTarget image coordinate.—
baseBase image coordinate.—
tagsImage tags.none
output"daemon" (local Docker daemon) or "tarball" (importable archive)."daemon"
format"docker" (manifest v2) or "oci"."docker"
dependsOnArtifacts to build first.none

An empty from, two distinct entries, or any other artifact type (including a WebImage) fails validation before the build.