Commit e6c9fcf08d3893a924f8961af7123a5a9c3c4ced

Edward Thomson 2021-08-09T08:42:06

ci: add centos7 and centos8 docker definitions

diff --git a/ci/docker/centos7 b/ci/docker/centos7
new file mode 100644
index 0000000..7164583
--- /dev/null
+++ b/ci/docker/centos7
@@ -0,0 +1,39 @@
+ARG BASE=centos:7
+FROM ${BASE} AS yum
+RUN yum install -y \
+	which \
+	git \
+	libarchive \
+	cmake \
+	gcc \
+	gcc-c++ \
+	make \
+	openssl-devel \
+	openssh-server \
+	git-daemon \
+	java-1.8.0-openjdk-headless \
+	sudo \
+	python
+
+FROM yum AS libssh2
+RUN cd /tmp && \
+    curl https://libssh2.org/download/libssh2-1.8.0.tar.gz | tar -xz && \
+    cd libssh2-1.8.0 && \
+    ./configure && \
+    make && \
+    make install
+
+FROM libssh2 AS cmake
+RUN cd /tmp && \
+    curl -L https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1.tar.gz | tar -xz && \
+    cd cmake-3.21.1 && \
+    ./configure && \
+    make && \
+    make install
+
+FROM libssh2 AS adduser
+RUN useradd --shell /bin/bash libgit2 --create-home
+
+FROM adduser AS configure
+ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
+RUN mkdir /var/run/sshd
diff --git a/ci/docker/centos8 b/ci/docker/centos8
new file mode 100644
index 0000000..0414838
--- /dev/null
+++ b/ci/docker/centos8
@@ -0,0 +1,30 @@
+ARG BASE=centos:8
+FROM ${BASE} AS yum
+RUN yum install -y \
+	which \
+	git \
+	libarchive \
+	cmake \
+	gcc \
+	make \
+	openssl-devel \
+	openssh-server \
+	git-daemon \
+	java-1.8.0-openjdk-headless \
+	sudo \
+	python39
+
+FROM yum AS libssh2
+RUN cd /tmp && \
+    curl https://libssh2.org/download/libssh2-1.8.0.tar.gz | tar -xz && \
+    cd libssh2-1.8.0 && \
+    ./configure && \
+    make && \
+    make install
+
+FROM libssh2 AS adduser
+RUN useradd --shell /bin/bash libgit2 --create-home
+
+FROM adduser AS configure
+ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
+RUN mkdir /var/run/sshd