Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit dd1d6a7

Browse files
authored
Merge pull request #37 from daijh/sync-ovc-dockerfile-template
Sync OVC dockerfile template
2 parents e161a86 + 80d206e commit dd1d6a7

File tree

1 file changed

+44
-29
lines changed
  • WebRTC-Sample/owt-server/image/owt-immersive

1 file changed

+44
-29
lines changed

WebRTC-Sample/owt-server/image/owt-immersive/Dockerfile

100644100755
Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
FROM centos:7.6.1810 AS build
33
WORKDIR /home
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
45

56
# COMMON BUILD TOOLS
67
RUN yum install -y -q bzip2 make autoconf libtool git wget ca-certificates pkg-config gcc gcc-c++ bison flex patch epel-release yum-devel libcurl-devel zlib-devel;
@@ -19,7 +20,7 @@ ARG AUTOMAKE_VER=1.14
1920
ARG AUTOMAKE_REPO=https://ftp.gnu.org/pub/gnu/automake/automake-${AUTOMAKE_VER}.tar.xz
2021
RUN wget -O - ${AUTOMAKE_REPO} | tar xJ && \
2122
cd automake-${AUTOMAKE_VER} && \
22-
./configure --prefix=/usr --libdir=/usr/local/lib64 --disable-doc && \
23+
./configure --prefix=/usr --libdir=/usr/local/lib64 --disable-doc && \
2324
make -j8 && \
2425
make install
2526

@@ -44,13 +45,35 @@ RUN wget -O - ${YASM_REPO} | tar xz && \
4445
make -j8 && \
4546
make install
4647

48+
# Build libnice
49+
ARG NICE_VER="0.1.4"
50+
ARG NICE_REPO=http://nice.freedesktop.org/releases/libnice-${NICE_VER}.tar.gz
51+
ARG LIBNICE_PATCH_VER="4.3.1"
52+
ARG LIBNICE_PATCH_REPO=https://github.com/open-webrtc-toolkit/owt-server/archive/v${LIBNICE_PATCH_VER}.tar.gz
53+
54+
RUN yum install -y -q glib2-devel
55+
56+
RUN wget -O - ${NICE_REPO} | tar xz && \
57+
cd libnice-${NICE_VER} && \
58+
wget -O - ${LIBNICE_PATCH_REPO} | tar xz && \
59+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-agentlock.patch && \
60+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-agentlock-plus.patch && \
61+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-removecandidate.patch && \
62+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-keepalive.patch && \
63+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-startcheck.patch && \
64+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-closelock.patch && \
65+
./configure --prefix="/usr/local" --libdir=/usr/local/lib64 && \
66+
make -s V= && \
67+
make install
68+
69+
4770
# Build open ssl
48-
ARG OPENSSL_MAJOR_VER="1.0.2"
49-
ARG OPENSSL_MINOR_VER="t"
50-
ARG OPENSSL_REPO=http://www.openssl.org/source/old/${OPENSSL_MAJOR_VER}/openssl-${OPENSSL_MAJOR_VER}${OPENSSL_MINOR_VER}.tar.gz
71+
ARG OPENSSL_BASE_VER="1.0.2"
72+
ARG OPENSSL_VER="1.0.2t"
73+
ARG OPENSSL_REPO=http://www.openssl.org/source/old/${OPENSSL_BASE_VER}/openssl-${OPENSSL_VER}.tar.gz
5174

5275
RUN wget -O - ${OPENSSL_REPO} | tar xz && \
53-
cd openssl-${OPENSSL_MAJOR_VER}${OPENSSL_MINOR_VER} && \
76+
cd openssl-${OPENSSL_VER} && \
5477
./config no-ssl3 --prefix="/usr/local" -fPIC && \
5578
make depend && \
5679
make -s V=0 && \
@@ -126,11 +149,13 @@ RUN wget -O - ${FFMPEG_PATCHES_RELEASE_URL} | tar xz
126149
RUN yum install -y -q libass-devel freetype-devel zlib-devel openssl-devel
127150

128151
RUN wget -O - ${FFMPEG_REPO} | tar xz && mv FFmpeg-${FFMPEG_VER} FFmpeg && \
129-
cd FFmpeg ;
152+
cd FFmpeg ;
153+
130154
# Compile FFmpeg
131155
RUN cd /home/FFmpeg && \
132156
export PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig" && \
133157
./configure --prefix="/usr/local" --libdir=/usr/local/lib64 --enable-shared --disable-static --disable-libvpx --disable-vaapi --enable-libfreetype --enable-libfdk-aac --enable-nonfree && \
158+
134159
make -j8 && \
135160
make install && make install DESTDIR="/home/build"
136161

@@ -143,7 +168,8 @@ RUN yum install -y -q ca-certificates wget xz-utils
143168

144169
RUN wget ${NODE_REPO} && \
145170
tar xf node-${NODE_VER}-linux-x64.tar.xz && \
146-
cp node-*/* /usr/local -rf && rm -rf node-*
171+
cp node-*/* /usr/local -rf && \
172+
rm -rf node-*
147173

148174
# Fetch SVT-HEVC
149175
ARG SVT_HEVC_VER=v1.4.3
@@ -152,6 +178,7 @@ ARG SVT_HEVC_REPO=https://github.com/intel/SVT-HEVC
152178
RUN yum install -y -q patch centos-release-scl && \
153179
yum install -y -q devtoolset-7
154180

181+
# hadolint ignore=SC1091
155182
RUN git clone ${SVT_HEVC_REPO} && \
156183
cd SVT-HEVC/Build/linux && \
157184
export PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig" && \
@@ -177,10 +204,8 @@ ARG OPENH264_BINARY=https://github.com/cisco/openh264/releases/download/v${OPENH
177204
ARG LICODE_COMMIT="8b4692c88f1fc24dedad66b4f40b1f3d804b50ca"
178205
ARG LICODE_REPO=https://github.com/lynckia/licode.git
179206
ARG LICODE_PATCH_REPO=https://github.com/open-webrtc-toolkit/owt-server/tree/master/scripts/patches/licode/
180-
ARG NICE_VER="0.1.4"
181-
ARG NICE_REPO=http://nice.freedesktop.org/releases/libnice-${NICE_VER}.tar.gz
182-
ARG SCVP_VER="v1.0.0"
183-
ARG SCVP_REPO=https://github.com/OpenVisualCloud/Immersive-Video-Sample.git
207+
ARG SCVP_VER="1.0.0"
208+
ARG SCVP_REPO=https://github.com/OpenVisualCloud/Immersive-Video-Sample/archive/v${SCVP_VER}.tar.gz
184209
ARG WEBRTC_REPO=https://github.com/open-webrtc-toolkit/owt-deps-webrtc.git
185210
ARG SERVER_PATH=/home/owt-server
186211
ARG OWT_SDK_REPO=https://github.com/open-webrtc-toolkit/owt-client-javascript.git
@@ -192,12 +217,12 @@ ARG WEBRTC_COMMIT="c2aa290cfe4f63d5bfbb6540122a5e6bf2783187"
192217
ARG FDKAAC_LIB=/home/build/usr/local/lib64
193218
RUN yum install -y -q python-devel glib2-devel boost-devel log4cxx-devel
194219
RUN yum install -y -q patch centos-release-scl devtoolset-7
195-
220+
ENV PYTHONIOENCODING=UTF-8
196221
# Install 360scvp
222+
# hadolint ignore=SC1091
197223
RUN cd /home && \
198-
git clone ${SCVP_REPO} && \
224+
wget -O - ${SCVP_REPO} | tar xz && mv Immersive-Video-Sample-${SCVP_VER} Immersive-Video-Sample && \
199225
cd Immersive-Video-Sample/src/360SCVP && \
200-
git checkout ${SCVP_VER} && \
201226
mkdir build && \
202227
cd build && \
203228
source /opt/rh/devtoolset-7/enable && \
@@ -209,13 +234,15 @@ RUN cd /home && \
209234
# 1. Clone OWT server source code
210235
# 2. Clone licode source code and patch
211236
# 3. Clone webrtc source code and patch
237+
238+
# hadolint ignore=SC1091
212239
RUN git clone -b ${OWT_BRANCH} ${OWTSERVER_REPO} && \
213240
source /opt/rh/devtoolset-7/enable && \
214241

215242
# Install node modules for owt
216243
npm config set proxy=${http_proxy} && \
217244
npm config set https-proxy=${http_proxy} && \
218-
npm install -g --loglevel error node-gyp@6.1.0 grunt-cli underscore jsdoc && \
245+
npm install -g --loglevel error node-gyp@v6.1.0 grunt-cli underscore jsdoc && \
219246
cd ${SERVER_PATH} && npm install nan && \
220247

221248
# Get openh264 for owt
@@ -240,19 +267,6 @@ RUN git clone -b ${OWT_BRANCH} ${OWTSERVER_REPO} && \
240267
mkdir -p ${SERVER_PATH}/build/libdeps/build/include && \
241268
cp erizoAPI/lib/json.hpp ${SERVER_PATH}/build/libdeps/build/include && \
242269

243-
# Install libnice for owt
244-
cd ${SERVER_PATH}/third_party && \
245-
wget -O - ${NICE_REPO} | tar xz && \
246-
cd libnice-${NICE_VER} && \
247-
patch -p1 < ${SERVER_PATH}/scripts/patches/libnice014-agentlock.patch && \
248-
patch -p1 < ${SERVER_PATH}/scripts/patches/libnice014-agentlock-plus.patch && \
249-
patch -p1 < ${SERVER_PATH}/scripts/patches/libnice014-removecandidate.patch && \
250-
patch -p1 < ${SERVER_PATH}/scripts/patches/libnice014-keepalive.patch && \
251-
patch -p1 < ${SERVER_PATH}/scripts/patches/libnice014-startcheck.patch && \
252-
./configure --prefix="/usr/local" --libdir=/usr/local/lib64 && \
253-
make -s V= && \
254-
make install && \
255-
256270
# Install webrtc for owt
257271
cd ${SERVER_PATH}/third_party && mkdir webrtc && cd webrtc &&\
258272
export GIT_SSL_NO_VERIFY=1 && \
@@ -283,7 +297,8 @@ RUN yum install -y -q ca-certificates wget xz-utils
283297

284298
RUN wget ${NODE_REPO} && \
285299
tar xf node-${NODE_VER}-linux-x64.tar.xz && \
286-
cp node-*/* /usr/local -rf && rm -rf node-*
300+
cp node-*/* /usr/local -rf && \
301+
rm -rf node-*
287302

288303
COPY --from=build /home/owt-server/dist /home/owt
289304
COPY --from=build /home/build /

0 commit comments

Comments
 (0)