]> git.localhorst.tv Git - blank.git/commitdiff
some docker scripts
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 8 Nov 2016 16:35:31 +0000 (17:35 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 8 Nov 2016 19:21:35 +0000 (20:21 +0100)
scripts/docker/archlinux-build/Dockerfile [new file with mode: 0644]
scripts/docker/debian-latest-build/Dockerfile [new file with mode: 0644]
scripts/docker/debian-testing-build/Dockerfile [new file with mode: 0644]
scripts/docker/exec.bash [new file with mode: 0755]

diff --git a/scripts/docker/archlinux-build/Dockerfile b/scripts/docker/archlinux-build/Dockerfile
new file mode 100644 (file)
index 0000000..d63f421
--- /dev/null
@@ -0,0 +1,3 @@
+FROM rafaelsoares/archlinux-devel
+
+RUN sudo pacman -S --noconfirm git glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib cppunit
diff --git a/scripts/docker/debian-latest-build/Dockerfile b/scripts/docker/debian-latest-build/Dockerfile
new file mode 100644 (file)
index 0000000..28c1e1c
--- /dev/null
@@ -0,0 +1,4 @@
+FROM debian:latest
+
+RUN apt update
+RUN apt -y install --no-install-recommends build-essential libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev libcppunit-dev
diff --git a/scripts/docker/debian-testing-build/Dockerfile b/scripts/docker/debian-testing-build/Dockerfile
new file mode 100644 (file)
index 0000000..ae387e4
--- /dev/null
@@ -0,0 +1,4 @@
+FROM debian:testing
+
+RUN apt update
+RUN apt -y install --no-install-recommends build-essential libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev libcppunit-dev
diff --git a/scripts/docker/exec.bash b/scripts/docker/exec.bash
new file mode 100755 (executable)
index 0000000..b146e76
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# execute from project root
+# 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
+
+IMAGE="${IMAGE:-archlinux-build}"
+
+if [[ "$TARGETS" == *codecov* ]]; then
+       ci_env=`bash <(curl -s https://codecov.io/env)`
+fi
+
+docker build -t "blank/${IMAGE}" scripts/docker/"${IMAGE}"
+docker run -v "$PWD":/repo ${ci_env} "blank/${IMAGE}" /bin/bash -c "cd /repo && make -j\$(nproc) $TARGETS"