forked from datarhei/restreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.bundle
41 lines (28 loc) · 938 Bytes
/
Dockerfile.bundle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ARG NODE_IMAGE=node:17-alpine3.15
ARG CORE_IMAGE=datarhei/base:alpine-core-latest
ARG FFMPEG_IMAGE=datarhei/base:alpine-ffmpeg-latest
FROM $NODE_IMAGE as restreamer-ui
ARG NODE_SPACE_SIZE=10240
ENV NODE_OPTIONS="--openssl-legacy-provider --max-old-space-size=$NODE_SPACE_SIZE"
ENV PUBLIC_URL "/ui"
COPY . /ui
RUN cd /ui && \
npm config set fetch-retries 10 && \
npm config set fetch-retry-mintimeout 100000 && \
npm config set fetch-retry-maxtimeout 600000 && \
npm config set cache-min 3600 && \
npm config ls -l && \
npm install && \
npm run build
FROM $CORE_IMAGE as core
FROM $FFMPEG_IMAGE
COPY --from=core /core /core
COPY --from=restreamer-ui /ui/build /core/ui
RUN ffmpeg -buildconf
ENV CORE_CONFIGFILE=/core/config/config.json
ENV CORE_DB_DIR=/core/config
ENV CORE_ROUTER_UI_PATH=/core/ui
ENV CORE_STORAGE_DISK_DIR=/core/data
VOLUME ["/core/data", "/core/config"]
ENTRYPOINT ["/core/bin/run.sh"]
WORKDIR /core