2023-06-21 20:58:54 +08:00
|
|
|
FROM nats:2.9.19-scratch as nats
|
2023-03-22 01:39:18 +08:00
|
|
|
FROM strukturag/nextcloud-spreed-signaling:1.1.2 as signaling
|
2023-06-19 22:36:48 +08:00
|
|
|
FROM coturn/coturn:4.6.2-alpine
|
2023-03-22 01:39:18 +08:00
|
|
|
USER root
|
2023-06-19 07:06:25 +08:00
|
|
|
# Pin alpine version manually as long as https://github.com/coturn/coturn/issues/1226 is not done
|
|
|
|
ENV ALPINE_VERSION=3.18
|
2023-03-22 01:39:18 +08:00
|
|
|
|
|
|
|
COPY --from=nats /nats-server /usr/local/bin/nats-server
|
|
|
|
COPY --from=signaling /usr/bin/nextcloud-spreed-signaling /usr/local/bin/nextcloud-spreed-signaling
|
2021-11-30 18:20:42 +08:00
|
|
|
|
2023-06-18 07:46:37 +08:00
|
|
|
COPY --chmod=775 start.sh /start.sh
|
2023-05-03 22:37:22 +08:00
|
|
|
COPY --chmod=664 supervisord.conf /supervisord.conf
|
|
|
|
|
2021-11-30 18:20:42 +08:00
|
|
|
RUN set -ex; \
|
2023-06-19 07:06:25 +08:00
|
|
|
grep VERSION_ID /etc/os-release | grep -q "$ALPINE_VERSION.[0-9]\+$"; \
|
2023-03-22 01:39:18 +08:00
|
|
|
apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
tzdata \
|
|
|
|
bash \
|
2023-06-15 20:39:51 +08:00
|
|
|
janus-gateway \
|
2023-03-22 01:39:18 +08:00
|
|
|
openssl \
|
2021-11-30 18:20:42 +08:00
|
|
|
supervisor \
|
2023-03-22 01:39:18 +08:00
|
|
|
bind-tools \
|
|
|
|
netcat-openbsd \
|
|
|
|
shadow \
|
|
|
|
util-linux \
|
|
|
|
build-base \
|
2023-06-18 01:21:57 +08:00
|
|
|
wget \
|
2023-06-15 22:45:16 +08:00
|
|
|
lua5.3-dev \
|
|
|
|
luarocks5.3; \
|
2023-03-22 01:39:18 +08:00
|
|
|
useradd --system talk; \
|
2023-06-15 22:45:16 +08:00
|
|
|
luarocks-5.3 install luajson; \
|
|
|
|
luarocks-5.3 install ansicolors; \
|
2023-03-22 01:39:18 +08:00
|
|
|
rename -v ".jcfg.sample" ".jcfg" /etc/janus/*.sample; \
|
|
|
|
apk del --no-cache \
|
|
|
|
shadow \
|
|
|
|
util-linux \
|
|
|
|
build-base \
|
2023-06-18 01:21:57 +08:00
|
|
|
wget \
|
2023-06-15 22:45:16 +08:00
|
|
|
lua5.3-dev \
|
|
|
|
luarocks5.3; \
|
2023-05-03 22:37:22 +08:00
|
|
|
\
|
2023-05-03 23:32:56 +08:00
|
|
|
# Give root a random password
|
2023-05-03 22:37:22 +08:00
|
|
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
|
|
|
\
|
2023-03-22 01:39:18 +08:00
|
|
|
touch \
|
|
|
|
/etc/nats.conf \
|
|
|
|
/etc/signaling.conf \
|
|
|
|
/etc/turnserver.conf; \
|
|
|
|
echo "listen: 127.0.0.1:4222" | tee /etc/nats.conf; \
|
|
|
|
mkdir -p \
|
|
|
|
/var/tmp \
|
|
|
|
/var/lib/turn \
|
|
|
|
/var/log/supervisord \
|
|
|
|
/var/run/supervisord; \
|
|
|
|
chown talk:talk -R \
|
|
|
|
/usr \
|
|
|
|
/etc/janus \
|
|
|
|
/etc/nats.conf \
|
|
|
|
/etc/signaling.conf \
|
|
|
|
/etc/turnserver.conf \
|
|
|
|
/var/lib/turn \
|
|
|
|
/var/log/supervisord \
|
|
|
|
/var/run/supervisord;
|
|
|
|
|
2022-08-20 02:34:51 +08:00
|
|
|
# Set default talk port https://github.com/nextcloud/all-in-one/issues/1011
|
|
|
|
ENV TALK_PORT=3478
|
|
|
|
|
2021-11-30 18:20:42 +08:00
|
|
|
USER talk
|
2023-06-18 07:46:37 +08:00
|
|
|
ENTRYPOINT ["/start.sh"]
|
2023-06-06 15:22:33 +08:00
|
|
|
CMD ["supervisord", "-c", "/supervisord.conf"]
|
2022-08-25 21:06:23 +08:00
|
|
|
|
2023-04-08 19:25:40 +08:00
|
|
|
HEALTHCHECK CMD (nc -z localhost 8081 && nc -z localhost 8188 && nc -z localhost 4222 && nc -z localhost "$TALK_PORT" && nc -z "$NC_DOMAIN" "$TALK_PORT") || exit 1
|
2023-06-26 06:56:08 +08:00
|
|
|
LABEL com.centurylinklabs.watchtower.enable="false"
|