Add docker files for testing on various linux distros

Change-Id: Ic05e2dc326a2b70c43132118d78f6d496d8b7e18
This commit is contained in:
KongQun Yang 2017-12-07 14:41:14 -08:00
parent 4e3a24fb41
commit feb7951f33
8 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,27 @@
FROM pritunl/archlinux
# Update, and install basic packages.
RUN pacman -S --needed --noconfirm python2 git curl gcc gcc-libs make fakeroot
# depot_tools uses python2 instead of python3.
RUN ln -sf python2 /usr/bin/python
# Install libtinfo.so.5 which is needed by clang.
RUN git clone https://aur.archlinux.org/ncurses5-compat-libs.git /tmp/ncurses-libs
# makepkg need to run from non root user.
RUN useradd -m makepkg_user
RUN chown makepkg_user /tmp/ncurses-libs
USER makepkg_user
WORKDIR /tmp/ncurses-libs
RUN gpg --keyserver pgp.mit.edu --recv-keys F7E48EDB
RUN makepkg
USER root
RUN pacman -U --noconfirm /tmp/ncurses-libs/ncurses5-compat-libs-6.0+20170527-1-x86_64.pkg.tar.xz
# Install depot_tools.
WORKDIR /
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,13 @@
FROM centos
# Update, and install basic packages.
RUN yum install -y git python git curl gcc-c++ findutils bzip2 \
ncurses-compat-libs libatomic
# Install depot_tools.
WORKDIR /
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,12 @@
FROM debian
# Update, and install basic packages
RUN apt-get update
RUN apt-get install -y build-essential curl git python
# install depot_tools http://www.chromium.org/developers/how-tos/install-depot-tools
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,13 @@
FROM fedora
# Update, and install basic packages.
RUN yum install -y git python git curl gcc-c++ findutils bzip2 \
ncurses-compat-libs libatomic
# Install depot_tools.
WORKDIR /
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,12 @@
FROM opensuse
# Update, and install basic packages.
RUN zypper in -y git python python-xml git curl gcc-c++ tar
# Install depot_tools.
WORKDIR /
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,12 @@
FROM ubuntu:17.10
# Update, and install basic packages.
RUN apt-get update
RUN apt-get install -y build-essential curl git python
# Install depot_tools.
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,12 @@
FROM ubuntu
# Update, and install basic packages.
RUN apt-get update
RUN apt-get install -y build-essential curl git python
# Install depot_tools.
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH /depot_tools:$PATH
# Build and run this docker by mapping shaka-packager with
# -v "shaka-packager:/shaka-packager".

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PACKAGER_DIR="$(dirname "$(dirname "$(dirname "$(dirname ${SCRIPT_DIR})")")")"
function docker_run() {
docker run -v ${PACKAGER_DIR}:/shaka-packager -w /shaka-packager/src my_container "$@"
}
for docker_file in ${SCRIPT_DIR}/*_Dockerfile ; do
docker build -t my_container -f ${docker_file} ${SCRIPT_DIR}
docker_run gclient runhooks
docker_run ninja -C out/Release
docker_run bash -c 'GYP_DEFINES="clang=0" gclient runhooks'
docker_run ninja -C out/Release
done