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

io.bkbn.skelegro.docker.commands.Env.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

private typealias Variables = Pair

class Env(
    var variables: List = emptyList(),
    comment: String? = null
) : Command(comment) {
  override fun tag() = "ENV"
  override fun toString() = "${tag()} ${variables.joinToString(separator = " ") { "${it.first}=${it.second}" }}"
}

fun Dockerfile.ENV(init: Env.() -> Unit): Env {
  val env = Env().apply(init)
  steps.add(env)
  return env
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy