From 9c76ea79ae3e34a402bfd445326c29f1f81739de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Thu, 1 Mar 2018 21:45:21 +1100 Subject: [PATCH] Add Dockerfile definitions Add alpine (musl-based) and ubuntu (glibc-based) descriptions for test images. To run the testapp in either of them, run: ``` docker-compose run alpine docker-compose run ubuntu ``` --- devtools/Dockerfile.alpine | 12 ++++++++++++ devtools/Dockerfile.arch | 17 +++++++++++++++++ devtools/Dockerfile.ubuntu | 12 ++++++++++++ docker-compose.yml | 14 ++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 devtools/Dockerfile.alpine create mode 100644 devtools/Dockerfile.arch create mode 100644 devtools/Dockerfile.ubuntu create mode 100644 docker-compose.yml diff --git a/devtools/Dockerfile.alpine b/devtools/Dockerfile.alpine new file mode 100644 index 0000000..ba75053 --- /dev/null +++ b/devtools/Dockerfile.alpine @@ -0,0 +1,12 @@ +FROM alpine:latest + +RUN apk update && apk add --no-cache musl-dev libevent-dev libseccomp-dev linux-headers gcc make automake autoconf + +ADD . /src +WORKDIR /src + +RUN ./autogen.sh +RUN ./configure --enable-seccomp +RUN make -j + +CMD make test diff --git a/devtools/Dockerfile.arch b/devtools/Dockerfile.arch new file mode 100644 index 0000000..af0a375 --- /dev/null +++ b/devtools/Dockerfile.arch @@ -0,0 +1,17 @@ +FROM archlinux/base:latest + +RUN pacman -Sy && pacman --noconfirm -S gcc automake autoconf libevent libseccomp git make perl +RUN ln -s /usr/bin/core_perl/prove /usr/bin/prove + +ADD . /src +WORKDIR /src + +RUN aclocal +RUN autoheader +RUN automake --gnu --add-missing +RUN autoconf + +RUN ./configure --enable-seccomp +RUN make -j + +CMD make test diff --git a/devtools/Dockerfile.ubuntu b/devtools/Dockerfile.ubuntu new file mode 100644 index 0000000..c54a303 --- /dev/null +++ b/devtools/Dockerfile.ubuntu @@ -0,0 +1,12 @@ +FROM ubuntu:latest + +RUN apt-get update && apt-get install -y build-essential automake1.11 autoconf libevent-dev libseccomp-dev git + +ADD . /src +WORKDIR /src + +RUN ./autogen.sh +RUN ./configure --enable-seccomp +RUN make -j + +CMD make test diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..93c13d1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + alpine: + build: + context: . + dockerfile: devtools/Dockerfile.alpine + ubuntu: + build: + context: . + dockerfile: devtools/Dockerfile.ubuntu + arch: + build: + context: . + dockerfile: devtools/Dockerfile.arch