--- /dev/null
+This directory contains base images, for building and testing.
+
+They have all the requirements needed, as per: doc/INSTALL.md
+
+Build them with "make docker BASE=ubuntu" after doing configure.
+
+You can also download them with "docker pull ccache/build:$BASE"
--- /dev/null
+FROM alpine:latest
+
+RUN apk add --no-cache \
+ gcc libc-dev \
+ make \
+ bash \
+ asciidoc \
+ autoconf \
+ gperf \
+ zlib-dev \
+ ##
--- /dev/null
+FROM centos:latest
+
+# note: graphviz adds libX11... :'‑(
+RUN yum install -y \
+ gcc \
+ make \
+ bash \
+ asciidoc \
+ autoconf \
+ gperf \
+ zlib-devel \
+ && rpm -e --nodeps graphviz \
+ && yum autoremove -y \
+ && yum clean all
-FROM ubuntu:16.04
+FROM debian:latest
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
make \
+ bash \
+ asciidoc xsltproc docbook-xml docbook-xsl \
autoconf \
gperf \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
-
-WORKDIR /tmp/build
-
-COPY . .
-
-RUN ./autogen.sh \
- && ./configure \
- && make \
- && make test
--- /dev/null
+FROM fedora:latest
+
+# note: graphviz adds libX11... :'‑(
+RUN dnf install -y \
+ gcc \
+ make findutils \
+ bash \
+ asciidoc \
+ autoconf \
+ gperf \
+ zlib-devel \
+ && rpm -e --nodeps graphviz \
+ && dnf autoremove -y \
+ && dnf clean all
--- /dev/null
+FROM ubuntu:latest
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ gcc \
+ make \
+ bash \
+ asciidoc xsltproc docbook-xml docbook-xsl \
+ autoconf \
+ gperf \
+ zlib1g-dev \
+ && rm -rf /var/lib/apt/lists/*
$(SCAN_BUILD) --use-cc=$(CC) $(srcdir)/configure
$(SCAN_BUILD) --use-cc=$(CC) --status-bugs $(MAKE) -B
+BASE=ubuntu
+TAG=ccache/build:$(BASE)
+
.PHONY: docker
-docker: misc/Dockerfile
- $(DOCKER) build -f $< $(srcdir)
+docker: base/$(BASE)/Dockerfile
+ $(DOCKER) inspect $(TAG) >/dev/null || $(DOCKER) build -t $(TAG) base/$(BASE)
+ $(DOCKER) run --rm -v $(PWD):/build -w /build $(TAG) misc/build.sh $(TEST)
.PHONY: travis
travis: .travis/Dockerfile
--- /dev/null
+#!/bin/sh -ex
+# doc/INSTALL.md
+./autogen.sh
+./configure
+make
+make ${*:-test}