2024-02-16 23:21:18 +08:00
|
|
|
# syntax=docker/dockerfile:latest
|
2024-08-28 20:16:51 +08:00
|
|
|
FROM nats:2.10.19-scratch AS nats
|
2023-09-28 02:26:51 +08:00
|
|
|
FROM eturnal/eturnal:1.12.0 AS eturnal
|
2024-07-02 20:06:49 +08:00
|
|
|
FROM strukturag/nextcloud-spreed-signaling:1.3.2 AS signaling
|
2024-07-23 20:19:49 +08:00
|
|
|
FROM alpine:3.20.2 AS janus
|
2023-03-22 01:39:18 +08:00
|
|
|
|
2024-06-21 20:04:51 +08:00
|
|
|
ARG JANUS_VERSION=v0.14.3
|
2023-06-29 22:16:44 +08:00
|
|
|
WORKDIR /src
|
2023-07-19 21:15:13 +08:00
|
|
|
RUN set -ex; \
|
|
|
|
apk add --no-cache \
|
2023-06-29 22:16:44 +08:00
|
|
|
ca-certificates \
|
2023-07-19 21:04:42 +08:00
|
|
|
git \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
build-base \
|
|
|
|
pkgconfig \
|
|
|
|
libtool \
|
|
|
|
util-linux \
|
|
|
|
glib-dev \
|
|
|
|
zlib-dev \
|
|
|
|
openssl-dev \
|
|
|
|
jansson-dev \
|
|
|
|
libnice-dev \
|
|
|
|
libconfig-dev \
|
|
|
|
libsrtp-dev \
|
2023-07-20 23:52:30 +08:00
|
|
|
libusrsctp-dev \
|
2023-07-19 21:04:42 +08:00
|
|
|
gengetopt-dev \
|
2023-06-29 22:16:44 +08:00
|
|
|
libwebsockets-dev; \
|
2023-07-19 21:21:40 +08:00
|
|
|
git clone --recursive https://github.com/meetecho/janus-gateway --depth=1 --single-branch --branch "$JANUS_VERSION" /src; \
|
|
|
|
/src/autogen.sh; \
|
2023-07-20 23:52:30 +08:00
|
|
|
/src/configure --disable-rabbitmq --disable-mqtt --disable-boringssl; \
|
2023-07-19 21:21:40 +08:00
|
|
|
make; \
|
|
|
|
make install; \
|
|
|
|
make configs; \
|
|
|
|
rename -v ".jcfg.sample" ".jcfg" /usr/local/etc/janus/*.jcfg.sample
|
2021-11-30 18:20:42 +08:00
|
|
|
|
2024-07-23 20:19:49 +08:00
|
|
|
FROM alpine:3.20.2
|
2023-08-10 03:51:10 +08:00
|
|
|
ENV ETURNAL_ETC_DIR="/conf"
|
2023-10-10 22:24:22 +08:00
|
|
|
COPY --from=janus --chmod=777 --chown=1000:1000 /usr/local /usr/local
|
|
|
|
COPY --from=eturnal --chmod=777 --chown=1000:1000 /opt/eturnal /opt/eturnal
|
|
|
|
COPY --from=nats --chmod=777 --chown=1000:1000 /nats-server /usr/local/bin/nats-server
|
|
|
|
COPY --from=signaling --chmod=777 --chown=1000:1000 /usr/bin/nextcloud-spreed-signaling /usr/local/bin/nextcloud-spreed-signaling
|
2023-06-24 23:54:12 +08:00
|
|
|
|
|
|
|
COPY --chmod=775 start.sh /start.sh
|
2023-08-17 20:22:39 +08:00
|
|
|
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
2023-06-24 23:54:12 +08:00
|
|
|
COPY --chmod=664 supervisord.conf /supervisord.conf
|
2023-05-03 22:37:22 +08:00
|
|
|
|
2021-11-30 18:20:42 +08:00
|
|
|
RUN set -ex; \
|
2024-04-17 23:52:42 +08:00
|
|
|
apk upgrade --no-cache -a; \
|
2023-03-22 01:39:18 +08:00
|
|
|
apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
tzdata \
|
|
|
|
bash \
|
|
|
|
openssl \
|
2021-11-30 18:20:42 +08:00
|
|
|
supervisor \
|
2023-03-22 01:39:18 +08:00
|
|
|
bind-tools \
|
|
|
|
netcat-openbsd \
|
2023-06-29 22:16:44 +08:00
|
|
|
\
|
2023-07-19 21:04:42 +08:00
|
|
|
glib \
|
|
|
|
zlib \
|
|
|
|
libssl3 \
|
|
|
|
libcrypto3 \
|
|
|
|
jansson \
|
|
|
|
libnice \
|
|
|
|
libconfig \
|
|
|
|
libsrtp \
|
2023-07-21 00:11:31 +08:00
|
|
|
libusrsctp \
|
2023-06-29 22:16:44 +08:00
|
|
|
libwebsockets \
|
|
|
|
\
|
2023-11-08 21:52:49 +08:00
|
|
|
shadow \
|
|
|
|
grep; \
|
2023-10-10 22:24:22 +08:00
|
|
|
useradd --system -u 1000 eturnal; \
|
2023-03-22 01:39:18 +08:00
|
|
|
apk del --no-cache \
|
2023-06-29 22:16:44 +08:00
|
|
|
shadow; \
|
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 \
|
2023-08-17 18:37:48 +08:00
|
|
|
/etc/nats.conf \
|
2023-08-10 03:51:10 +08:00
|
|
|
/etc/eturnal.yml; \
|
2023-03-22 01:39:18 +08:00
|
|
|
echo "listen: 127.0.0.1:4222" | tee /etc/nats.conf; \
|
|
|
|
mkdir -p \
|
|
|
|
/var/tmp \
|
2023-06-27 00:11:00 +08:00
|
|
|
/conf \
|
2023-03-22 01:39:18 +08:00
|
|
|
/var/lib/turn \
|
|
|
|
/var/log/supervisord \
|
2023-06-29 22:16:44 +08:00
|
|
|
/var/run/supervisord \
|
|
|
|
/usr/local/lib/janus/loggers; \
|
2023-06-24 23:54:12 +08:00
|
|
|
chown eturnal:eturnal -R \
|
2023-03-22 01:39:18 +08:00
|
|
|
/etc/nats.conf \
|
|
|
|
/var/log/supervisord \
|
2023-06-27 00:11:00 +08:00
|
|
|
/var/run/supervisord; \
|
|
|
|
chmod 777 -R \
|
2023-07-13 20:40:51 +08:00
|
|
|
/tmp \
|
2023-06-27 00:11:00 +08:00
|
|
|
/conf \
|
|
|
|
/var/run/supervisord \
|
2023-08-22 04:10:31 +08:00
|
|
|
/var/log/supervisord; \
|
|
|
|
ln -s /opt/eturnal/bin/stun /usr/local/bin/stun; \
|
|
|
|
ln -s /opt/eturnal/bin/eturnalctl /usr/local/bin/eturnalctl
|
2023-03-22 01:39:18 +08:00
|
|
|
|
2023-06-24 23:54:12 +08:00
|
|
|
USER eturnal
|
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-08-17 20:22:39 +08:00
|
|
|
HEALTHCHECK CMD /healthcheck.sh
|
2023-06-26 06:56:08 +08:00
|
|
|
LABEL com.centurylinklabs.watchtower.enable="false"
|