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