-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
debug.gradle.kts
44 lines (40 loc) · 1.24 KB
/
debug.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import de.gesellix.docker.client.DockerClientImpl
buildscript {
repositories {
// mavenLocal()
// fun findProperty(s: String) = project.findProperty(s) as String?
// listOf(
// "docker-client/*",
// "gesellix/*"
// ).forEach { repo ->
// maven {
// name = "github"
// setUrl("https://maven.pkg.github.com/$repo")
// credentials {
// username = System.getenv("PACKAGE_REGISTRY_USER") ?: findProperty("github.package-registry.username")
// password = System.getenv("PACKAGE_REGISTRY_TOKEN") ?: findProperty("github.package-registry.password")
// }
// }
// }
mavenCentral()
}
dependencies {
classpath("de.gesellix:docker-client:[2024-11-01T01-01-01,)")
}
}
tasks.register("checkDockerAvailability") {
group = "docker"
val client = DockerClientImpl()
doFirst {
logger.lifecycle("Docker Host:\n|> ${client.env.dockerHost} <|")
}
doLast {
try {
logger.lifecycle("Docker Ping:\n|> ${client.ping().content} <|")
logger.lifecycle("Docker Version:\n|> ${client.version().content} <|")
logger.lifecycle("Docker Info:\n|> ${client.info().content} <|")
} catch (e: Exception) {
logger.warn("Docker Engine not available?", e)
}
}
}