Dockerfile for gstreamer 1.10.4

Docker 2017.02.28 18:41 Posted by 김한별 behonestar

ubuntu 16.04 Docker 이미지에 gstreamer를 설치하는 Dockerfile입니다.

필요하지 않은 플러그인 설치 코드는 제거하고 사용하시면 됩니다.


FROM ubuntu:16.04


RUN apt-get -y update

RUN apt-get install -y vim

RUN apt-get install -y bison

RUN apt-get install -y g++

RUN apt-get install -y flex

RUN apt-get install -y wget

RUN apt-get install -y pkg-config

RUN apt-get install -y gettext

RUN apt-get install -y zlib1g-dev

RUN apt-get install -y yasm

RUN apt-get install -y libpcre3 libpcre3-dev


RUN apt-get install -y python2.7

RUN apt-get install -y python-pip

RUN export PYTHON=/usr/bin/python2.7


# install glib

WORKDIR /root

RUN wget ftp://sourceware.org/pub/libffi/libffi-3.2.tar.gz

RUN tar -zxvf libffi-3.2.tar.gz

WORKDIR /root/libffi-3.2

RUN sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \

    -i include/Makefile.in && sed -e '/^includedir/ s/=.*$/=@includedir@/' \

    -e 's/^Cflags: -I${includedir}/Cflags:/' \

    -i libffi.pc.in && ./configure --prefix=/usr --disable-static && make

RUN make install


WORKDIR /root

RUN wget http://ftp.gnome.org/pub/gnome/sources/glib/2.48/glib-2.48.2.tar.xz

RUN tar xvf glib-2.48.2.tar.xz

WORKDIR /root/glib-2.48.2

RUN ./configure

RUN make && make install


# install gstreamer

WORKDIR /root

RUN wget http://liboil.freedesktop.org/download/liboil-0.3.17.tar.gz

RUN tar -zxvf liboil-0.3.17.tar.gz

WORKDIR /root/liboil-0.3.17

RUN ./configure

RUN make && make install


WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.10.4.tar.xz

RUN tar -xvf gstreamer-1.10.4.tar.xz

WORKDIR /root/gstreamer-1.10.4

RUN ./configure

RUN make && make install


# install plugins

WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/data/src/gst-plugins-base/gst-plugins-base-1.10.4.tar.xz

RUN tar -xvf gst-plugins-base-1.10.4.tar.xz

WORKDIR /root/gst-plugins-base-1.10.4

RUN ./configure

RUN make && make install


WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.10.4.tar.xz

RUN tar -xvf gst-plugins-good-1.10.4.tar.xz

WORKDIR /root/gst-plugins-good-1.10.4

RUN ./configure

RUN make && make install


WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/data/src/gst-plugins-bad/gst-plugins-bad-1.10.4.tar.xz

RUN tar -xvf gst-plugins-bad-1.10.4.tar.xz

WORKDIR /root/gst-plugins-bad-1.10.4

RUN ./configure

RUN make && make install


WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.10.4.tar.xz

RUN tar -xvf gst-plugins-ugly-1.10.4.tar.xz

WORKDIR /root/gst-plugins-ugly-1.10.4

RUN ./configure

RUN make && make install


# install libav

WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.10.4.tar.xz

RUN tar -xvf gst-libav-1.10.4.tar.xz

WORKDIR /root/gst-libav-1.10.4

RUN ./configure

RUN make && make install


# install gst-rtsp-server

WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.4.tar.xz

RUN tar -xvf gst-rtsp-server-1.10.4.tar.xz

WORKDIR /root/gst-rtsp-server-1.10.4

RUN ./configure

RUN make && make install


# install gst-rtsp

WORKDIR /root

RUN wget https://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-server-1.10.4.tar.xz

RUN tar -xvf gst-rtsp-server-1.10.4.tar.xz

WORKDIR /root/gst-rtsp-server-1.10.4

RUN ./configure

RUN make && make install


# install gst-python
RUN apt-get install -y libgirepository1.0-dev
RUN apt-get install -y python-cairo-dev
RUN apt-get install -y libcairo2-dev

WORKDIR /root
RUN wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.10/pygobject-3.10.2.tar.xz
RUN tar -xvf pygobject-3.10.2.tar.xz
WORKDIR /root/pygobject-3.10.2
RUN ./configure
RUN make && make install

WORKDIR /root
RUN wget https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.10.4.tar.xz
RUN tar -xvf gst-python-1.10.4.tar.xz
WORKDIR /root/gst-python-1.10.4
RUN ./configure
RUN make && make install

WORKDIR /root
RUN ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so /usr/lib/libpython2.7.so
RUN ldconfig


댓글을 달아 주세요