All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.bkbn.skelegro.docker.commands.Cmd.kt Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
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