docker/mod/webrtc-sfu/Dockerfile

36 lines
1004 B
Docker
Raw Normal View History

ARG BBB_BUILD_TAG
FROM bigbluebutton/bbb-build:$BBB_BUILD_TAG AS builder
2021-11-27 17:38:40 +01:00
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 \
2021-11-27 17:38:40 +01:00
&& 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
# =============================
2023-09-12 18:31:01 +02:00
FROM node:18-bullseye-slim
RUN useradd --uid 2004 --user-group webrtc-sfu
ENV NODE_ENV production
COPY --from=builder /app /app
2023-03-21 12:49:00 +01:00
RUN mkdir /home/webrtc-sfu && chown -R webrtc-sfu:webrtc-sfu /app/config /home/webrtc-sfu
USER webrtc-sfu
WORKDIR /app
CMD [ "npm", "start" ]