From 566339e5d16fb47538a70f3f80a67683d48a4d1d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 6 Aug 2020 14:10:33 +0200 Subject: centos7: initial commit --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c2d6234 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +# https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ +# comments dropped, updated for podman builds +# this variant builds without caching + +image: registry.gitlab.com/kraxel/podman-docker-builder:latest + +stages: + - build + +before_script: + - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + +Build: + stage: build + only: + - branches + script: + - > + podman build + --build-arg VCS_REF=$CI_COMMIT_SHA + --build-arg VCS_URL=$CI_PROJECT_URL + --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH + . + - podman push $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be1ef7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM centos:7 + +ENV SUMMARY="CentOS 7 builder" \ + DESCRIPTION="CentOS 7 image for test builds and rpm package builds." + +LABEL maintainer="Gerd Hoffmann " \ + summary="${SUMMARY}" \ + description="${DESCRIPTION}" + +USER root + +RUN yum update -y && \ + yum install -y \ + yum-utils \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && \ + yum install -y \ + fedora-packager \ + && \ + yum clean all -y -- cgit