mirror of
https://github.com/bigbluebutton/docker.git
synced 2024-12-03 05:23:58 +01:00
36 lines
1.0 KiB
Docker
36 lines
1.0 KiB
Docker
ARG BBB_BUILD_TAG
|
|
FROM gitlab.senfcall.de:5050/senfcall-public/docker-bbb-build:$BBB_BUILD_TAG AS builder
|
|
|
|
|
|
RUN useradd --uid 2004 --user-group webrtc-sfu
|
|
|
|
ADD ./bbb-webrtc-sfu /app
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
# due to the git submodule npm install crashes with following error:
|
|
# npm ERR! fatal: Not a git repository: ../.git/modules/bbb-webrtc-sfu
|
|
# we simply delete the .git file
|
|
RUN cd /app \
|
|
&& cp config/default.example.yml config/production.yml \
|
|
&& rm .git \
|
|
&& npm install --unsafe-perm \
|
|
&& npm cache clear --force \
|
|
&& rm -rf node_modules/mediasoup/worker/out/Release/subprojects \
|
|
&& rm -rf node_modules/mediasoup/worker/out/Release/mediasoup-worker.p \
|
|
&& rm -rf node_modules/mediasoup/worker/out/Release/deps
|
|
|
|
|
|
# =============================
|
|
FROM node:16-bullseye-slim
|
|
RUN useradd --uid 2004 --user-group webrtc-sfu
|
|
ENV NODE_ENV production
|
|
|
|
COPY --from=builder /app /app
|
|
RUN mkdir /home/webrtc-sfu && chown -R webrtc-sfu:webrtc-sfu /app/config /home/webrtc-sfu
|
|
|
|
USER webrtc-sfu
|
|
WORKDIR /app
|
|
CMD [ "npm", "start" ]
|