DockerContainer

data class DockerContainer(val context: DockerDaemon, val containerName: String) : EnvContainer

Wrapper class representing a Docker container.

TODO(Derppening): Mark the constructor as internal after modularization.

Constructors

Link copied to clipboard
constructor(context: DockerDaemon, containerName: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
private val context: DockerDaemon

Functions

Link copied to clipboard
open suspend override fun exec()
Link copied to clipboard
open suspend override fun inspect(): InspectContainerResponse?
Link copied to clipboard
open suspend override fun log(): ContainerLogger

suspend fun <T : ResultCallbackTemplate<ResultCallback.Adapter<Frame>, Frame>, ContainerLogger> log(containerLogger: T, configure: suspend LogContainerCmd.() -> Unit = {}): T

Retrieves the logs of this container.

Link copied to clipboard
open suspend override fun <T> readPath(path: Path, mapper: suspend (InputStream) -> T): Option<T>

suspend fun <T> readPath(path: Path, configure: suspend CopyArchiveFromContainerCmd.() -> Unit = {}, mapper: suspend (TarArchiveInputStream) -> T): Option<T>

Reads a path from the container environment into the host.

Link copied to clipboard
open suspend override fun remove(): Boolean

suspend fun remove(configure: suspend RemoveContainerCmd.() -> Unit): Boolean

Removes this container from the virtualization engine.

Link copied to clipboard
open suspend override fun wait(timeout: Duration): Int
Link copied to clipboard
open suspend override fun writePath(inputStream: InputStream, path: Path)

suspend fun writePath(hostPath: Path, containerPath: Path, configure: suspend CopyArchiveToContainerCmd.() -> Unit = {})

Writes the content from the hostPath to containerPath.

suspend fun writePath(inputStream: TarArchiveInputStream, path: Path, configure: suspend CopyArchiveToContainerCmd.() -> Unit)

Writes the content from the inputStream to path.