forked from AirenSoft/OvenMediaEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.local
51 lines (38 loc) · 1.53 KB
/
Dockerfile.local
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
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:22.04 AS base
## Install libraries by package
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y tzdata sudo curl
FROM base AS build
WORKDIR /tmp
ENV PREFIX=/opt/ovenmediaengine
ENV TEMP_DIR=/tmp/ome
ARG OME_VERSION=local
ARG STRIP=TRUE
## Copy code to image
COPY ./ ${TEMP_DIR}/
## Install dependencies
RUN \
${TEMP_DIR}/misc/prerequisites.sh
## Build OvenMediaEngine
RUN \
cd ${TEMP_DIR}/src && \
make release -j$(nproc)
RUN \
if [ "$STRIP" = "TRUE" ] ; then strip ${TEMP_DIR}/src/bin/RELEASE/OvenMediaEngine ; fi
## Make running environment
RUN \
cd ${TEMP_DIR}/src && \
mkdir -p ${PREFIX}/bin/origin_conf && \
mkdir -p ${PREFIX}/bin/edge_conf && \
cp ./bin/RELEASE/OvenMediaEngine ${PREFIX}/bin/ && \
cp ../misc/conf_examples/Origin.xml ${PREFIX}/bin/origin_conf/Server.xml && \
cp ../misc/conf_examples/Logger.xml ${PREFIX}/bin/origin_conf/Logger.xml && \
cp ../misc/conf_examples/Edge.xml ${PREFIX}/bin/edge_conf/Server.xml && \
cp ../misc/conf_examples/Logger.xml ${PREFIX}/bin/edge_conf/Logger.xml && \
rm -rf ${TEMP_DIR}
FROM base AS release
WORKDIR /opt/ovenmediaengine/bin
EXPOSE 80/tcp 8080/tcp 8090/tcp 1935/tcp 3333/tcp 3334/tcp 4000-4005/udp 10000-10010/udp 9000/tcp
COPY --from=build /opt/ovenmediaengine /opt/ovenmediaengine
# Default run as Origin mode
CMD ["/opt/ovenmediaengine/bin/OvenMediaEngine", "-c", "origin_conf"]