2023-06-08 21:06:14 +08:00
|
|
|
FROM python:3.11.4-alpine3.18
|
2023-06-06 15:22:33 +08:00
|
|
|
|
|
|
|
COPY --chmod=775 start.sh /start.sh
|
|
|
|
|
2023-06-06 20:02:39 +08:00
|
|
|
ENV RECORDING_VERSION v16.0.4
|
2023-06-06 19:43:06 +08:00
|
|
|
|
2023-06-06 15:22:33 +08:00
|
|
|
RUN set -ex; \
|
|
|
|
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-06-06 15:22:33 +08:00
|
|
|
openssl; \
|
|
|
|
# chromium chromium-chromedriver?
|
|
|
|
apk add --no-cache geckodriver --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; \
|
|
|
|
useradd -d /tmp --system recording; \
|
|
|
|
# Give root a random password
|
|
|
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
2023-06-06 19:43:06 +08:00
|
|
|
git clone --recursive https://github.com/nextcloud/spreed --depth=1 --single-branch --branch "$RECORDING_VERSION" /src; \
|
2023-06-06 15:22:33 +08:00
|
|
|
mv -v /src/recording/pyproject.toml /src/recording/src/pyproject.toml; \
|
|
|
|
python3 -m pip install /src/recording/src; \
|
|
|
|
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-06 15:22:33 +08:00
|
|
|
apk del --no-cache \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
shadow \
|
|
|
|
openssl;
|
|
|
|
|
2023-06-06 17:27:52 +08:00
|
|
|
WORKDIR /tmp
|
2023-06-06 15:22:33 +08:00
|
|
|
USER recording
|
|
|
|
ENTRYPOINT ["/start.sh"]
|
|
|
|
CMD ["python", "-m", "nextcloud.talk.recording", "--config", "/etc/recording.conf"]
|
|
|
|
|
|
|
|
HEALTHCHECK CMD nc -z localhost 1234 || exit 1
|
|
|
|
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|