-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (58 loc) · 2.53 KB
/
Dockerfile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#BUILD APP
FROM maven:3.9.9-amazoncorretto-21@sha256:d713be6874d7711b26384e169291bdf773cc2f1a6fbcb0ba0c603288d8a5fe45 AS build_app
WORKDIR /usr/src/app
COPY pom.xml .
COPY lib lib
RUN for file in ./lib/*; do mvn org.apache.maven.plugins:maven-install-plugin:install-file -Dfile=$file; done; mvn dependency:go-offline
COPY src/ ./src/
RUN mvn -f ./pom.xml package
#BUILD SPOTIFYD
FROM rust:1.81.0-bookworm@sha256:fcd390e0a3a6bfcf26969861efbe7b864df052aa71a361cf3cd7c5c585b1b413 AS build_spotifyd
RUN apt-get update && apt-get install -y libasound2-dev libssl-dev libpulse-dev libdbus-1-dev
RUN git clone https://github.com/Spotifyd/spotifyd.git /usr/src/spotifyd
WORKDIR /usr/src/spotifyd
RUN cargo build --release --no-default-features --features pulseaudio_backend
#PACKAGE
FROM debian:12.7-slim@sha256:a629e796d77a7b2ff82186ed15d01a493801c020eed5ce6adaa2704356f15a1c
RUN \
apt-get update \
&& apt-get install -y wget gnupg2 software-properties-common \
&& (wget -O - https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg) \
&& (echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list) \
&& apt-get update \
&& apt-get install -y \
java-21-amazon-corretto-jdk \
libasound2 \
libdbus-1-3 \
libegl1 \
libfontconfig1 \
libfreetype6 \
libgl1 \
libglib2.0-0 \
libnss3 \
libpci3 \
libxcomposite1 \
libxcursor1 \
libxi6 \
libxkbcommon0 \
libxslt1.1 \
libxss1 \
libxtst6 \
pulseaudio \
supervisor \
vlc \
xvfb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.luac \
&& wget -q https://raw.githubusercontent.com/videolan/vlc/master/share/lua/playlist/youtube.lua -O /usr/lib/x86_64-linux-gnu/vlc/lua/playlist/youtube.lua \
&& mkdir -p /usr/local/teamspeak \
&& wget -q https://files.teamspeak-services.com/releases/client/3.5.6/TeamSpeak3-Client-linux_amd64-3.5.6.run -O /usr/local/teamspeak/install.run \
&& chmod +x /usr/local/teamspeak/install.run \
&& echo -ne "\ny" | (cd /usr/local/teamspeak/ && ./install.run)
COPY ./docker-fs /
ENV ENABLE_TEAMSPEAK false
ENV TS3SERVER ""
ENV TS3_APIKEY M2I6-MKSK-OCHP-JR0T-CY8L-T3H3
COPY --from=build_app /usr/src/app/target/clientv2-0.0.1-SNAPSHOT.jar /usr/local/musikbot/musikbot.jar
COPY --from=build_spotifyd /usr/src/spotifyd/target/release/spotifyd /usr/local/spotifyd/spotifyd
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]