diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..f78b50e52 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,15 @@ +FROM openjdk:11-jre-slim + +ENV JMB_VERSION 0.4.0-bypass + +#No downloadable example config since 0.2.10 +RUN mkdir -p /jmb/config +ADD https://github.com/sks316/MusicBot/releases/download/$JMB_VERSION/JMusicBot-$JMB_VERSION.jar /jmb/JMusicBot.jar +ADD https://github.com/jagrosh/MusicBot/releases/download/0.2.9/config.txt /jmb/config/config.txt + +COPY ./docker-entrypoint.sh /jmb +COPY ./config.txt /jmb/config + +RUN chmod +x /jmb/docker-entrypoint.sh + +ENTRYPOINT ["/jmb/docker-entrypoint.sh"] diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh new file mode 100644 index 000000000..2c6ff9a16 --- /dev/null +++ b/docker/docker-entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo "Starting JMusicBot by Jagrosh https://github.com/jagrosh/MusicBot" +echo "Using JMusicBot-bypass fork by sks316 https://github.com/sks316/MusicBot" +echo "Containerized by Craumix https://github.com/Craumix/jmb-container" +echo "Version: $JMB_VERSION" + +cd /jmb/config +java -jar -Dnogui=true /jmb/JMusicBot.jar + +echo "Seems like java stopped... Waiting for 30 seconds before termination..." +sleep 30s +echo "Terminating!"