io.bkbn.skelegro.docker.commands.Cmd.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
typealias Instructions = List
class Cmd(
var instructions: Instructions = emptyList(),
comment: String? = null
) : Command(comment) {
override fun tag() = "CMD"
override fun toString() =
"${tag()} ${instructions.joinToString(prefix = "[\"", separator = "\", \"", postfix = "\"]")}"
}
fun Dockerfile.CMD(init: Cmd.() -> Unit): Cmd {
val cmd = Cmd().apply(init)
steps.add(cmd)
return cmd
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy