-FROM rafaelsoares/archlinux-devel
+FROM localhorsttv/archlinux-run:latest
-RUN sudo pacman -S --noconfirm \
+RUN pacman -S --needed --noconfirm \
+ base-devel \
cppcheck \
cppunit \
- freealut \
git \
- glew \
glm \
- openal \
- sdl2 \
- sdl2_image \
- sdl2_net \
- sdl2_ttf \
- zlib \
- ;
+ && \
+ paccache -rk 0
-FROM rafaelsoares/archlinux
+FROM base/archlinux
-RUN sudo pacman -S --noconfirm \
- freealut \
- glew \
- glm \
- openal \
- sdl2 \
- sdl2_image \
- sdl2_net \
- sdl2_ttf \
- zlib \
+RUN echo 'Server = http://mirror.23media.de/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist \
+ && pacman-key --init \
+ && pacman-key --populate archlinux \
+ && pacman -Sy --noconfirm archlinux-keyring \
+ && pacman -S --noconfirm pacman \
+ && pacman-db-upgrade \
+ && pacman -Su --noconfirm \
+ && pacman -S --noconfirm \
+ git \
+ make \
+ mesa-libgl \
+ xorg-server-xvfb \
+ && paccache -rk 0 \
+ ;
+
+RUN pacman -S --needed --noconfirm \
+ freealut \
+ glew \
+ openal \
+ sdl2 \
+ sdl2_image \
+ sdl2_net \
+ sdl2_ttf \
+ zlib \
+ && paccache -rk 0 \
+ && mkdir -p /etc/openal \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
;
-FROM centos:latest
+FROM localhorsttv/centos-run:latest
-RUN yum -y update \
- && yum -y install epel-release \
- && yum -y update \
- && yum -y group install "Development Tools"
-RUN yum -y install \
- cppcheck \
- cppunit-devel \
- freealut-devel \
- glew-devel \
- glm-devel \
- openal-soft-devel \
- SDL2-devel \
- SDL2_image-devel \
- SDL2_net-devel \
- SDL2_ttf-devel \
- zlib-devel \
+RUN yum -y group install "Development Tools" \
+ && yum -y install \
+ cppcheck \
+ cppunit-devel \
+ freealut-devel \
+ glew-devel \
+ glm-devel \
+ openal-soft-devel \
+ SDL2-devel \
+ SDL2_image-devel \
+ SDL2_net-devel \
+ SDL2_ttf-devel \
+ zlib-devel \
+ && yum -y clean packages \
;
--- /dev/null
+FROM centos:latest
+
+RUN yum -y update \
+ && yum -y install epel-release \
+ && yum -y update \
+ && yum -y install \
+ git \
+ make \
+ which \
+ xorg-x11-server-utils \
+ xorg-x11-server-Xvfb \
+ && yum -y clean packages \
+ ;
+
+RUN yum -y install \
+ freealut \
+ glew \
+ openal-soft \
+ SDL2 \
+ SDL2_image \
+ SDL2_net \
+ SDL2_ttf \
+ zlib \
+ && yum -y clean packages \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
+ ;
-FROM debian:latest
+FROM localhorsttv/debian-run:latest
+
+RUN apt -y install build-essential \
+ && apt-get -y clean \
+ ;
-RUN apt update \
- && apt -y install build-essential
RUN apt -y install --no-install-recommends \
cppcheck \
libalut-dev \
libsdl2-net-dev \
libsdl2-ttf-dev \
zlib1g-dev \
+ && apt-get -y clean \
;
-FROM debian:testing
+FROM localhorsttv/debian-run:testing
+
+RUN apt -y install build-essential \
+ && apt-get -y clean \
+ ;
-RUN apt update \
- && apt -y install build-essential
RUN apt -y install --no-install-recommends \
cppcheck \
libalut-dev \
libsdl2-net-dev \
libsdl2-ttf-dev \
zlib1g-dev \
+ && apt-get -y clean \
;
--- /dev/null
+FROM debian:latest
+
+RUN apt -y update \
+ && apt -y upgrade \
+ && apt -y install --no-install-recommends \
+ git \
+ make \
+ xauth \
+ xvfb \
+ && apt-get -y clean \
+ ;
+
+RUN apt -y install --no-install-recommends \
+ libalut0 \
+ libglew1.10 \
+ libglu1-mesa \
+ libopenal1 \
+ libsdl2-2.0-0 \
+ libsdl2-image-2.0-0 \
+ libsdl2-net-2.0-0 \
+ libsdl2-ttf-2.0-0 \
+ zlib1g \
+ && apt-get -y clean \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
+ ;
+
+ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu
--- /dev/null
+FROM debian:testing
+
+RUN apt -y update \
+ && apt -y upgrade \
+ && apt -y install --no-install-recommends \
+ dbus \
+ git \
+ make \
+ xauth \
+ xvfb \
+ && apt-get -y clean \
+ ;
+
+RUN apt -y install --no-install-recommends \
+ libalut0 \
+ libglew1.10 \
+ libglu1-mesa \
+ libopenal1 \
+ libsdl2-2.0-0 \
+ libsdl2-image-2.0-0 \
+ libsdl2-net-2.0-0 \
+ libsdl2-ttf-2.0-0 \
+ zlib1g \
+ && apt-get -y clean \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
+ ;
# environment varables:
# IMAGE: name of the docker image to use
# TARGETS: targets to pass to `make` inside the container
-# PASS_ENV: names of environment variables to import into
-# the container during build
+# KEEP: file names to copy back out after all TARGETS have run
IMAGE="${IMAGE:-archlinux-build}"
image_name="localhorsttv/${IMAGE}"
image_path="scripts/docker/${IMAGE//:/-}"
-build_cmd="cd /repo && make -j\$(nproc) $TARGETS"
+xvfb_cmd="xvfb-run -a --server-args='-screen 0 1024x768x24 +extension RANDR +extension GLX'"
+
+build_cmd="cp -R /repo /workdir && cd /workdir && make -j\$(nproc) $TARGETS"
+
+if [[ "$KEEP" != "" ]]; then
+ build_cmd="${build_cmd} && cp -Rv $KEEP /repo"
+fi
+
local_conf=""
local_conf="$local_conf $(bash <(curl -s https://codecov.io/env))"
fi
-if [ -e "${image_path}/env" ]; then
- local_conf="$local_conf --env-file ${image_path}/env"
-fi
-
docker build -t "${image_name}" --pull=true "${image_path}"
-docker run -v "$PWD":/repo ${local_conf} "${image_name}" /bin/bash -c "${build_cmd}"
+docker run -v "$PWD":/repo ${local_conf} "${image_name}" sh -c "$xvfb_cmd sh -c '${build_cmd}'"
-FROM ubuntu:devel
+FROM localhorsttv/ubuntu-run:devel
+
+RUN apt -y install build-essential \
+ && apt-get -y clean \
+ ;
-RUN apt update \
- && apt -y install build-essential
RUN apt -y install --no-install-recommends \
cppcheck \
libalut-dev \
libsdl2-net-dev \
libsdl2-ttf-dev \
zlib1g-dev \
+ && apt-get -y clean \
;
-FROM ubuntu:latest
+FROM localhorsttv/ubuntu-run:latest
+
+RUN apt -y install build-essential \
+ && apt-get -y clean \
+ ;
-RUN apt update \
- && apt -y install build-essential
RUN apt -y install --no-install-recommends \
cppcheck \
libalut-dev \
libsdl2-net-dev \
libsdl2-ttf-dev \
zlib1g-dev \
+ && apt-get -y clean \
;
+
+ENV LDXXFLAGS -L/usr/lib/x86_64-linux-gnu
--- /dev/null
+FROM ubuntu:devel
+
+RUN apt -y update \
+ && apt -y upgrade \
+ && apt -y install --no-install-recommends \
+ dbus \
+ git \
+ make \
+ xauth \
+ xvfb \
+ && apt-get -y clean \
+ ;
+
+
+RUN apt -y install --no-install-recommends \
+ libalut0 \
+ libglew1.10 \
+ libglu1-mesa \
+ libopenal1 \
+ libsdl2-2.0-0 \
+ libsdl2-image-2.0-0 \
+ libsdl2-net-2.0-0 \
+ libsdl2-ttf-2.0-0 \
+ zlib1g \
+ && apt-get -y clean \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
+ ;
--- /dev/null
+FROM ubuntu:latest
+
+RUN apt update \
+ && apt -y upgrade \
+ && apt -y install --no-install-recommends \
+ dbus \
+ git \
+ make \
+ xauth \
+ xvfb \
+ && apt-get -y clean \
+ ;
+
+RUN apt -y install --no-install-recommends \
+ libalut0 \
+ libglew1.10 \
+ libglu1-mesa \
+ libopenal1 \
+ libsdl2-2.0-0 \
+ libsdl2-image-2.0-0 \
+ libsdl2-net-2.0-0 \
+ libsdl2-ttf-2.0-0 \
+ zlib1g \
+ && apt-get -y clean \
+ && printf '[general]\ndrivers = null\n' > /etc/openal/alsoft.conf \
+ ;
+
+ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu