docker: Add initial images

This commit is contained in:
Edward Hervey 2017-10-21 12:45:38 +02:00
parent 74f2d5735c
commit aa441579c4
8 changed files with 237 additions and 0 deletions

2
docker/README Normal file
View file

@ -0,0 +1,2 @@
GStreamer Docker images

View file

@ -0,0 +1,76 @@
FROM gstreamer/base-fedora:latest
# Add rpmfusion repositories and install all build dependencies of GStreamer
RUN dnf builddep -y \
gstreamer1 \
gstreamer1-plugins-base \
gstreamer1-plugins-good \
gstreamer1-plugins-good-extras \
gstreamer1-plugins-ugly \
gstreamer1-plugins-ugly-free \
gstreamer1-plugins-bad-nonfree \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-bad-free-extras \
gstreamer1-plugins-bad-freeworld \
gstreamer1-libav \
gstreamer1-rtsp-server \
&& \
rpm -e \
gstreamer1 \
gstreamer1-plugins-base \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
&& \
dnf install -y \
ccache \
gcc-c++ \
git \
json-glib-devel \
libunwind-devel \
opencv-devel \
openjpeg2-devel \
patch \
redhat-rpm-config \
xorg-x11-server-Xvfb \
xorg-x11-server-utils \
wget \
&& \
dnf clean all
# Clone copies of all repositories to avoid extra downloads
RUN mkdir /repositories && \
cd /repositories && \
for i in orc \
common \
gstreamer \
gst-plugins-base \
gst-plugins-good \
gst-plugins-bad \
gst-plugins-ugly \
gst-libav \
gst-build \
gst-devtools\
gst-docs \
gst-editing-services \
gst-omx \
gst-python \
gst-rtsp-server; \
do \
git clone --mirror https://anongit.freedesktop.org/git/gstreamer/$i; \
done
# Install repo tool
RUN wget -nd https://storage.googleapis.com/git-repo-downloads/repo -O /usr/bin/repo && chmod a+x /usr/bin/repo
# Add the user UID:1000, GID:1000, home at /gstbuild
RUN groupadd -r gstbuild -g 1000 && useradd -u 1000 -r -g gstbuild -m -d /gstbuild -s /sbin/nologin -c "Gstbuild user" gstbuild && \
chmod 755 /gstbuild
# Set the working directory to gstbuild home directory
WORKDIR /gstbuild
# Specify the user to execute all commands below
USER gstbuild
# Configure git for various usage
RUN git config --global user.email "gstbuild@gstreamer.net" && git config --global user.name "Gstbuild Runner"

View file

@ -0,0 +1,12 @@
FROM gstreamer/build-base-fedora:latest
USER root
RUN dnf install -y \
meson
USER gstbuild
RUN git clone git://anongit.freedesktop.org/gstreamer/gst-build
WORKDIR /gstbuild/gst-build

View file

@ -0,0 +1,62 @@
FROM gstreamer/base-ubuntu:latest
# make source packages available in order to figure out build dependencies
RUN \
sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list && \
apt-get update && \
apt-get -y build-dep \
orc \
gstreamer1.0 \
gst-plugins-base1.0 \
gst-plugins-good1.0 \
gst-plugins-bad1.0 \
gst-plugins-ugly1.0 \
gst-libav1.0 \
gst-rtsp-server1.0 \
gst-python1.0 \
gstreamer-vaapi \
gstreamer-editing-services1.0 && \
apt-get -y install \
ccache \
git \
xvfb \
wget
# Clone copies of all repositories to avoid extra downloads
RUN mkdir /repositories && \
cd /repositories && \
for i in orc \
common \
gstreamer \
gst-plugins-base \
gst-plugins-good \
gst-plugins-bad \
gst-plugins-ugly \
gst-libav \
gst-build \
gst-devtools\
gst-docs \
gst-editing-services \
gst-omx \
gst-python \
gst-rtsp-server; \
do \
git clone --mirror https://anongit.freedesktop.org/git/gstreamer/$i; \
done
# Install repo tool
RUN wget -nd https://storage.googleapis.com/git-repo-downloads/repo -O /usr/bin/repo && chmod a+x /usr/bin/repo
# Add the user UID:1000, GID:1000, home at /gstbuild
RUN groupadd -r gstbuild -g 1000 && useradd -u 1000 -r -g gstbuild -m -d /gstbuild -s /sbin/nologin -c "Gstbuild user" gstbuild && \
chmod 755 /gstbuild
# Set the working directory to gstbuild home directory
WORKDIR /gstbuild
# Specify the user to execute all commands below
USER gstbuild
# Configure git for various usage
RUN git config --global user.email "gstbuild@gstreamer.net" && git config --global user.name "Gstbuild Runner"

View file

@ -0,0 +1,8 @@
#!/bin/sh
echo Building gstreamer/build-base-fedora:latest
docker build -t gstreamer/build-base-fedora:latest . -f Dockerfile-fedora
echo Building gstreamer/build-base-ubuntu:latest
docker build -t gstreamer/build-base-ubuntu:latest . -f Dockerfile-ubuntu

View file

@ -0,0 +1,47 @@
FROM fedora:26
# Add rpmfusion repositories and install all build dependencies of GStreamer
# and then remove the gst packages themselves
RUN echo "fastestmirror=true" >> /etc/dnf/dnf.conf && \
dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-26.noarch.rpm \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-26.noarch.rpm && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-26 && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-26 && \
dnf upgrade -y && \
dnf install -y \
dnf-plugins-core \
json-glib \
libunwind \
opencv \
openjpeg2 \
procps-ng \
&& \
dnf install -y \
gstreamer1 \
gstreamer1-plugins-base \
gstreamer1-plugins-good \
gstreamer1-plugins-good-extras \
gstreamer1-plugins-ugly \
gstreamer1-plugins-ugly-free \
gstreamer1-plugins-bad-nonfree \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-bad-free-extras \
gstreamer1-plugins-bad-freeworld \
gstreamer1-libav \
gstreamer1-rtsp-server \
&& \
rpm -e \
gstreamer1 \
gstreamer1-plugins-base \
gstreamer1-plugins-good \
gstreamer1-plugins-good-extras \
gstreamer1-plugins-ugly \
gstreamer1-plugins-ugly-free \
gstreamer1-plugins-bad-nonfree \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-bad-free-extras \
gstreamer1-plugins-bad-freeworld \
gstreamer1-rtsp-server \
gstreamer1-libav \
&& \
dnf clean all

View file

@ -0,0 +1,21 @@
FROM ubuntu:17.04
# upgrade and install all runtime dependencies for gstreamer
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install --no-install-recommends\
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-bad-faad \
gstreamer1.0-plugins-bad-videoparsers \
gstreamer1.0-plugins-ugly \
gstreamer1.0-plugins-ugly-amr \
gstreamer1.0-rtsp \
gstreamer1.0-alsa \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-pulseaudio \
gstreamer1.0-x \
libgstreamer-plugins-base1.0-0 \
libgstreamer1.0

9
docker/runtime-images/build.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
echo Building gstreamer/base-fedora:latest
docker build -t gstreamer/base-fedora:latest . -f Dockerfile-fedora
echo Building gstreamer/base-ubuntu:latest
docker build -t gstreamer/base-ubuntu:latest . -f Dockerfile-ubuntu