From 02196e0df2d9ae88c5af88458a71931ab5228f75 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Thu, 16 Jan 2020 14:37:17 -0800 Subject: [PATCH] Add Support for Centos-8 Signed-off-by: Arko Dasgupta --- rpm/Makefile | 2 +- rpm/centos-8/Dockerfile | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rpm/centos-8/Dockerfile diff --git a/rpm/Makefile b/rpm/Makefile index a876e18a0e..a38119ef04 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -43,7 +43,7 @@ SOURCE_FILES=engine-image engine.tgz cli.tgz docker.service docker.socket distri SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 -CENTOS_RELEASES := centos-7 +CENTOS_RELEASES := centos-7 centos-8 .PHONY: help help: ## show make targets diff --git a/rpm/centos-8/Dockerfile b/rpm/centos-8/Dockerfile new file mode 100644 index 0000000000..b56e0a8d01 --- /dev/null +++ b/rpm/centos-8/Dockerfile @@ -0,0 +1,27 @@ +ARG GO_IMAGE +ARG DISTRO=centos +ARG SUITE=8 +ARG BUILD_IMAGE=${DISTRO}:${SUITE} + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ENV GOPROXY=direct +ENV GO111MODULE=off +ENV GOPATH=/go +ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH 1 +ENV DOCKER_BUILDTAGS seccomp selinux +ENV RUNC_BUILDTAGS seccomp selinux +ARG DISTRO +ARG SUITE +ENV DISTRO=${DISTRO} +ENV SUITE=${SUITE} +RUN yum install -y rpm-build rpmlint +COPY SPECS /root/rpmbuild/SPECS +# Overwrite repo that was failing on aarch64 +RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo +RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"]