io.bkbn.skelegro.docker.commands.Label.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
private typealias LabelPair = Pair
class Label(var labels: List = emptyList(), comment: String? = null) : Command(comment) {
override fun tag() = "LABEL"
override fun toString() = "${tag()} ${labels.joinToString(separator = " ") { "${it.first}=\"${it.second}\"" }}"
}
fun Dockerfile.LABEL(init: Label.() -> Unit): Label {
val label = Label().apply(init)
steps.add(label)
return label
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy