An Elide project can package a JVM artifact as a Docker or OCI image. Container
images are build artifacts, not a standalone elide 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"
}
}Run the project build:
elide buildUse output = "daemon" to publish to a local Docker daemon or
output = "tarball" to write an importable archive. The image format may be
docker or oci.
A container currently accepts one source artifact even though from is a
listing. See the elide.pkl Reference for the complete
artifact schema.