io.bkbn.skelegro.docker.commands.From.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of skelegro-docker Show documentation
Show all versions of skelegro-docker Show documentation
A wacky assortment of Kotlin DSLs for infrastructure manifest generation
package io.bkbn.skelegro.docker.commands
import io.bkbn.skelegro.docker.Dockerfile
import io.bkbn.skelegro.docker.modify
open class From(
var stageName: String? = null,
var image: String = "",
var version: String = "latest",
comment: String? = null
) : Command(comment) {
override fun tag() = "FROM"
override fun toString() = "${tag()} $image:$version${stageName?.modify { sn -> " AS $sn" } ?: ""}"
}
fun Dockerfile.FROM(init: From.() -> Unit): From {
val f = From().apply(init)
from = f
return f
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy