diff --git a/deploy_mediaconch/Dockerfile b/deploy_mediaconch/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9279b565b80089c8963c16eac9681d3445a56e32 --- /dev/null +++ b/deploy_mediaconch/Dockerfile @@ -0,0 +1,117 @@ +FROM centos:6.10 +MAINTAINER Andreas Romeyke <romeyke@slub-dresden.de> + +# based on https://hub.docker.com/r/rpmbuild/centos6/ +## next steps needed because deprecated certificates +RUN yum clean all -y +RUN yum check -y +RUN yum update ca-certificates -y +RUN yum upgrade -y + +## install base environment +RUN yum install -v -y libtool +RUN yum install -v -y libtool-ltdl +RUN yum install -v -y make cmake +RUN yum install -v -y pkgconfig +RUN yum install -v -y sudo +RUN yum install -v -y automake autoconf +RUN yum install -v -y wget +RUN yum install -v -y yum-utils rpm-build +RUN wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo +# git [devtools-2] (1.8.4) for "rev-list --count" feature, git [centos6] (1.7.1) too old +RUN yum install -y devtoolset-2-git +RUN ln -s /opt/rh/devtoolset-2/root/usr/bin/git /usr/bin/git +RUN yum install -y devtoolset-2-gcc devtoolset-2-binutils +RUN yum install -y devtoolset-2-gcc-c++ devtoolset-2-libstdc++-devel devtoolset-2-toolchain +#RUN yum install -y devtoolset-2 +RUN scl enable devtoolset-2 bash +RUN yum install -v -y tree +RUN yum install -v -y autoconf automake libtool pkgconfig +RUN yum install -v -y libxml2-devel libxslt-devel zlib-devel libsqlite-devel + +## add user environment +RUN useradd builder -u 1000 -m -G users,wheel && \ + echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \ + echo "# macros" > /home/builder/.rpmmacros && \ + echo "%_topdir /home/builder/rpm" >> /home/builder/.rpmmacros && \ + echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \ + echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \ + echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \ + echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \ + echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \ + mkdir /home/builder/rpm && \ + chown -R builder /home/builder +USER builder +RUN scl enable devtoolset-2 bash +ENV FLAVOR=rpmbuild OS=centos DIST=el6 CC=/opt/rh/devtoolset-2/root/usr/bin/gcc CXX=/opt/rh/devtoolset-2/root/usr/bin/g++ +CMD /srv/pkg +WORKDIR /home/builder/ +ENV DISTDIR=/home/builder/distribution/usr/local +RUN mkdir -p $DISTDIR + +# get and compile libzen +RUN git clone https://github.com/MediaArea/ZenLib.git +# next lines only usefull if mediaconch build with cmake +#RUN cd ZenLib && \ +# mkdir build &&\ +# cd build &&\ +# cmake ../Project/CMake -DCMAKE_INSTALL_PREFIX=$DISTDIR &&\ +# make -j &&\ +# make install +RUN cd ZenLib &&\ + cd Project/GNU/Library && \ + sed -e "s/-O2/-O3/g" -i autogen.sh && \ + sed -e "s/-O2/-O3/g" -i configure.ac && \ + ./autogen.sh +RUN cd ZenLib/Project/GNU/Library &&\ + ./configure --prefix=$DISTDIR &&\ + make -j &&\ + make install + +ENV ZenLibDir $DISTDIR + + +# get and compile libmediainfo +RUN git clone https://github.com/MediaArea/MediaInfoLib.git +# next lines only usefull if mediaconch build with cmake +#RUN cd MediaInfoLib &&\ +# mkdir build &&\ +# cd build &&\ +# cmake ../Project/CMake -DCMAKE_INSTALL_PREFIX=$DISTDIR &&\ +# make -j &&\ +# make install +RUN cd MediaInfoLib &&\ + cd Project/GNU/Library && \ + sed -e "s/-O2/-O3/g" -i autogen.sh && \ + sed -e "s/-O2/-O3/g" -i configure.ac && \ + ./autogen.sh +RUN cd MediaInfoLib/Project/GNU/Library/ &&\ + ./configure --prefix=$DISTDIR &&\ + make -j &&\ + make install + +#ENV PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$DISTDIR/lib64/pkgconfig:$DISTDIR/lib/pkgconfig +#run echo $PKG_CONFIG_PATH + +# get and compile mediaconch +RUN git clone https://github.com/MediaArea/MediaConch_SourceCode.git + #cmake ../Project/CMake -DCMAKE_INSTALL_PREFIX=$DISTDIR &&\ +RUN cd MediaConch_SourceCode &&\ + cd Project/GNU/CLI && \ + sed -e "s/-O2/-O3/g" -i autogen.sh && \ + sed -e "s/-O2/-O3/g" -i configure.ac && \ + ./autogen.sh +RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\ + ./configure --help +RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\ + ./configure --prefix=$DISTDIR --without-sqlite --without-jansson --without-libevent + +RUN cd MediaConch_SourceCode/Project/GNU/CLI/ &&\ + make -j &&\ + make install + +RUN tree $DISTDIR +RUN cd $DISTDIR/../../ && tar -cz -f /tmp/mediaconch.tgz * +RUN ls -lha /tmp/ + +