2024-02-16 23:21:18 +08:00
|
|
|
# syntax=docker/dockerfile:latest
|
2024-09-10 20:51:43 +08:00
|
|
|
FROM python:3.12.6-alpine3.20
|
2023-06-06 15:22:33 +08:00
|
|
|
|
|
|
|
COPY --chmod=775 start.sh /start.sh
|
|
|
|
|
2024-06-21 19:27:36 +08:00
|
|
|
ENV RECORDING_VERSION=v0.1
|
|
|
|
ENV ALLOW_ALL=false
|
|
|
|
ENV HPB_PROTOCOL=https
|
|
|
|
ENV SKIP_VERIFY=false
|
|
|
|
ENV HPB_PATH=/standalone-signaling/
|
2023-06-06 19:43:06 +08:00
|
|
|
|
2023-06-06 15:22:33 +08:00
|
|
|
RUN set -ex; \
|
2024-04-17 23:52:42 +08:00
|
|
|
apk upgrade --no-cache -a; \
|
2023-06-06 15:22:33 +08:00
|
|
|
apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
tzdata \
|
|
|
|
bash \
|
|
|
|
xvfb \
|
|
|
|
ffmpeg \
|
|
|
|
firefox \
|
|
|
|
bind-tools \
|
|
|
|
netcat-openbsd \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
shadow \
|
2023-06-06 17:27:52 +08:00
|
|
|
pulseaudio \
|
2023-11-16 23:13:00 +08:00
|
|
|
openssl \
|
2023-11-16 23:16:41 +08:00
|
|
|
build-base \
|
2024-06-21 05:58:19 +08:00
|
|
|
linux-headers \
|
|
|
|
geckodriver; \
|
2023-06-06 15:22:33 +08:00
|
|
|
useradd -d /tmp --system recording; \
|
|
|
|
# Give root a random password
|
|
|
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
2023-11-16 18:43:49 +08:00
|
|
|
git clone --recursive https://github.com/nextcloud/nextcloud-talk-recording --depth=1 --single-branch --branch "$RECORDING_VERSION" /src; \
|
|
|
|
python3 -m pip install --no-cache-dir /src; \
|
2023-06-06 15:22:33 +08:00
|
|
|
rm -rf /src; \
|
2023-06-06 18:48:43 +08:00
|
|
|
touch /etc/recording.conf; \
|
2023-06-06 16:41:19 +08:00
|
|
|
chown recording:recording -R \
|
2023-06-06 17:27:52 +08:00
|
|
|
/tmp /etc/recording.conf; \
|
2023-06-27 00:18:26 +08:00
|
|
|
mkdir -p /conf; \
|
|
|
|
chmod 777 /conf; \
|
|
|
|
chmod 777 /tmp; \
|
2023-06-06 15:22:33 +08:00
|
|
|
apk del --no-cache \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
shadow \
|
2023-11-16 23:13:00 +08:00
|
|
|
openssl \
|
2023-11-16 23:16:41 +08:00
|
|
|
build-base \
|
|
|
|
linux-headers;
|
2023-06-06 15:22:33 +08:00
|
|
|
|
2023-06-06 17:27:52 +08:00
|
|
|
WORKDIR /tmp
|
2023-06-06 15:22:33 +08:00
|
|
|
USER recording
|
|
|
|
ENTRYPOINT ["/start.sh"]
|
2023-06-27 00:18:26 +08:00
|
|
|
CMD ["python", "-m", "nextcloud.talk.recording", "--config", "/conf/recording.conf"]
|
2023-06-06 15:22:33 +08:00
|
|
|
|
2024-05-28 23:24:28 +08:00
|
|
|
HEALTHCHECK CMD nc -z 127.0.0.1 1234 || exit 1
|
2023-06-26 06:56:08 +08:00
|
|
|
LABEL com.centurylinklabs.watchtower.enable="false"
|