docker/mod/webrtc-sfu/Dockerfile

27 lines
638 B
Docker
Raw Normal View History

2020-11-23 15:49:05 +01:00
FROM node:14-alpine
RUN apk add git \
&& adduser -D -u 2004 -g webrtc-sfu webrtc-sfu
2021-02-11 20:17:42 +01:00
ADD ./bbb-webrtc-sfu app
WORKDIR 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 cp config/default.example.yml config/production.yml \
&& chown -R webrtc-sfu:webrtc-sfu config \
&& rm .git \
&& npm install --unsafe-perm \
&& npm cache clear --force
2021-02-11 20:17:42 +01:00
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
USER webrtc-sfu
ENTRYPOINT [ "./docker-entrypoint.sh" ]
CMD [ "npm", "start" ]