-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (32 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
43 lines (32 loc) · 1.22 KB
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
FROM eclipse-temurin:24-jre-ubi9-minimal
WORKDIR /home/container
ENV HTTP_PORT=8080
ENV RTMP_PORT=1935
# FFmpeg
RUN <<EOF
set -e
microdnf install xz -y
mkdir /home/container/lib
mkdir /home/container/lib/ffmpeg
cd /home/container/lib/ffmpeg
curl -L -o x86_64.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n8.1-latest-linux64-lgpl-shared-8.1.tar.xz"
curl -L -o aarch64.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n8.1-latest-linuxarm64-lgpl-shared-8.1.tar.xz"
# Move the FFmpeg binaries and libs to add it to the path
echo "Using $(arch).tar.xz"
tar --strip-components=1 -xJf $(arch).tar.xz
mv /home/container/lib/ffmpeg/bin/* /usr/bin
mv /home/container/lib/ffmpeg/lib/* /usr/lib64
rm -rf /home/container/lib
# We no longer need this :^)
microdnf remove xz -y
microdnf clean all
EOF
# Quark
COPY ./bootstrap/target/quark.jar /home/container
# Healthcheck
HEALTHCHECK --interval=5s --timeout=5s --retries=6 --start-period=5s \
CMD curl -f "http://localhost:$HTTP_PORT/_healthcheck" || exit 1
# Entrypoint
CMD ["sh", "-c", "java $JAVA_OPTS -jar quark.jar"]
EXPOSE $HTTP_PORT/tcp
EXPOSE $RTMP_PORT/tcp