$crooge MxDuck
$crooge MxDuck
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Yeah, similarly when I run it locally it works, but when try to run in container its failing
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Will try to found out, if nothing works, guess will need to try with fatJar, anyway, thanks
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
ok
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
I'm currently on my local macOS machine
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Well, I will later on publish it so I can pull it from my linux server to run it
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Nah, same error
glados-bot-container | Error: Could not find or load main class surik.simyan.glados.MainKt
glados-bot-container | Caused by: java.lang.ClassNotFoundException: surik.simyan.glados.MainKt
glados-bot-container | Error: Could not find or load main class surik.simyan.glados.MainKt
glados-bot-container | Caused by: java.lang.ClassNotFoundException: surik.simyan.glados.MainKt
Maybe something is wrong with compose file?
version: '3.9'

services:

kord:
build: .
image: ssimyan/glados:1.0.0
platform: linux/amd64
restart: always
container_name: "glados-bot-container"
version: '3.9'

services:

kord:
build: .
image: ssimyan/glados:1.0.0
platform: linux/amd64
restart: always
container_name: "glados-bot-container"
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
cool, let me prune all and try to run it
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
So is everthing right now?
FROM openjdk:21
ADD ./build/install/glados /app/glados
WORKDIR /app/glados
RUN chmod +x ./bin/glados.sh
ENTRYPOINT ["./bin/glados.sh"]
FROM openjdk:21
ADD ./build/install/glados /app/glados
WORKDIR /app/glados
RUN chmod +x ./bin/glados.sh
ENTRYPOINT ["./bin/glados.sh"]
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
ok
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Ok, and now my sh file is in /app/glados directly or what?
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Wait, when we run ADD ./build/install/glados /app/glados don't we just add files from glados directory from install to /app/glados?
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
So, we end up something like this?
FROM openjdk:21
ADD ./build/install/glados /app/glados
WORKDIR /app/glados
RUN chmod +x /bin/glados.sh
ENTRYPOINT ["/bin/glados.sh"]
FROM openjdk:21
ADD ./build/install/glados /app/glados
WORKDIR /app/glados
RUN chmod +x /bin/glados.sh
ENTRYPOINT ["/bin/glados.sh"]
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
Tried even without copying
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
I changed it to this
FROM openjdk:21
#COPY ./build/install/glados /app/glados
RUN chmod +x ./build/install/glados
ENTRYPOINT ["./build/install/glados/bin/glados.sh"]
FROM openjdk:21
#COPY ./build/install/glados /app/glados
RUN chmod +x ./build/install/glados
ENTRYPOINT ["./build/install/glados/bin/glados.sh"]
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
And gradle build file
68 replies
KKord
Created by $crooge MxDuck on 7/13/2024 in #help
Running distribution inside docker container?
plugins {
alias(libs.plugins.kotlinJvm)
application
}

group = "surik.simyan.glados"
version = "1.0.0"
application {
mainClass.set("surik.simyan.glados.MainKt")
}

repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.lavalink.dev/releases")
maven {
name = "Sonatype Snapshots (Legacy)"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}

maven {
name = "Sonatype Snapshots"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
}

dependencies {
implementation(libs.kord.core)
implementation(libs.kord.rest)
implementation(libs.kord.voice)
implementation(libs.kord.core.voice)
implementation(libs.kord.extensions)
implementation(libs.slf4j.simple)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.logging)
implementation(libs.lavaplayer)
implementation(libs.youtube)
testImplementation(kotlin("test"))
}

tasks.test {
useJUnitPlatform()
}


kotlin {
jvmToolchain(21)
}
plugins {
alias(libs.plugins.kotlinJvm)
application
}

group = "surik.simyan.glados"
version = "1.0.0"
application {
mainClass.set("surik.simyan.glados.MainKt")
}

repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.lavalink.dev/releases")
maven {
name = "Sonatype Snapshots (Legacy)"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}

maven {
name = "Sonatype Snapshots"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
}

dependencies {
implementation(libs.kord.core)
implementation(libs.kord.rest)
implementation(libs.kord.voice)
implementation(libs.kord.core.voice)
implementation(libs.kord.extensions)
implementation(libs.slf4j.simple)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.logging)
implementation(libs.lavaplayer)
implementation(libs.youtube)
testImplementation(kotlin("test"))
}

tasks.test {
useJUnitPlatform()
}


kotlin {
jvmToolchain(21)
}
68 replies