Skip to content

Commit 898f254

Browse files
committed
Update oci image
1 parent c6bd4c6 commit 898f254

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

build.gradle.kts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,19 @@ oci {
228228
imageDefinitions.register("main") {
229229
imageName = "hivemq/hivemq-ce"
230230
allPlatforms {
231-
parentImages {
232-
add("library:eclipse-temurin:sha256!78a82edcacc6cef9fd8c8a276fbd5e08f72fcdfbaf9d28df8b2d9207a7450cb6") // 21.0.3_9-jre-jammy
231+
dependencies {
232+
runtime("library:eclipse-temurin:sha256!5f8358c9d5615c18e95728e8b8528bda7ff40a7a5da2ac9a35b7a01f5d9b231a") // 21.0.5_11-jre-jammy
233233
}
234234
config {
235235
user = "10000"
236-
ports = setOf("1883", "8000")
236+
ports = setOf(/* MQTT */ "1883", /* MQTT over WebSocket */ "8000")
237237
environment = mapOf(
238238
"JAVA_OPTS" to "-XX:+UnlockExperimentalVMOptions -XX:+UseNUMA",
239239
"HIVEMQ_ALLOW_ALL_CLIENTS" to "true",
240240
"LANG" to "en_US.UTF-8",
241+
// As the user id that runs the container (10000 by default) does not have an entry in /etc/passwd, set the home directory explicitly.
242+
// If not set, HOME would default to "/".
243+
// Java uses this value for the system property "user.home".
241244
"HOME" to "/opt/hivemq",
242245
)
243246
entryPoint = listOf("/opt/docker-entrypoint.sh")
@@ -246,23 +249,21 @@ oci {
246249
workingDirectory = "/opt/hivemq"
247250
}
248251
layers {
249-
layer("hivemq") {
252+
layer("main") {
250253
contents {
251254
into("opt") {
252255
from("docker/docker-entrypoint.sh") { filePermissions = 0b111_101_101 }
253-
permissions("hivemq/", 0b111_111_000)
256+
permissions("hivemq/", 0b111_111_101)
254257
into("hivemq") {
255-
filePermissions = 0b110_100_000
256-
directoryPermissions = 0b111_101_000
257-
permissions("**/*.sh", 0b111_101_000)
258-
permissions("conf/", 0b111_111_000)
259-
permissions("conf/config.xml", 0b110_110_000)
260-
permissions("conf/logback.xml", 0b110_110_000)
261-
permissions("data/", 0b111_111_000)
262-
permissions("extensions/", 0b111_111_000)
263-
permissions("extensions/*/", 0b111_111_000)
264-
permissions("extensions/*/hivemq-extension.xml", 0b110_110_000)
265-
permissions("log/", 0b111_111_000)
258+
permissions("**/*.sh", 0b111_101_101)
259+
permissions("conf/", 0b111_111_101)
260+
permissions("conf/config.xml", 0b110_110_100)
261+
permissions("conf/logback.xml", 0b110_110_100)
262+
permissions("data/", 0b111_111_101)
263+
permissions("extensions/", 0b111_111_101)
264+
permissions("extensions/*/", 0b111_111_101)
265+
permissions("extensions/*/hivemq-extension.xml", 0b110_110_100)
266+
permissions("log/", 0b111_111_101)
266267
from("src/distribution") { filter { exclude("**/.gitkeep") } }
267268
from("docker/config.xml") { into("conf") }
268269
from("src/main/resources/config.xsd") { into("conf") }

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ javadocLinks = { id = "io.github.sgtsilvio.gradle.javadoc-links", version = "0.8
8686
license = { id = "com.github.hierynomus.license", version = "0.16.1" }
8787
metadata = { id = "io.github.sgtsilvio.gradle.metadata", version = "0.6.0" }
8888
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" }
89-
oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.10.0" }
89+
oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.19.0" }
9090
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
9191
versions = { id = "com.github.ben-manes.versions", version = "0.51.0" }

0 commit comments

Comments
 (0)