From 6cea4d407fcedcd4dc553dc2e0095a3fc8731494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 27 Aug 2024 11:41:53 +0200 Subject: [PATCH 1/2] Remove end-of-life packaging distributions Upgrade versions of Fedora and Ubuntu LTS Remove EOL CentOS Linux and CentOS Stream --- packaging/README.md | 11 +++--- packaging/deb/Makefile | 4 +- packaging/deb/ubuntu-cosmic/Dockerfile | 39 ------------------- packaging/deb/ubuntu-disco/Dockerfile | 39 ------------------- packaging/deb/ubuntu-eoan/Dockerfile | 39 ------------------- .../Dockerfile | 2 +- packaging/rpm/Makefile | 4 +- packaging/rpm/centos-7/Dockerfile | 26 ------------- packaging/rpm/centos-8/Dockerfile | 26 ------------- packaging/rpm/centos-stream/Dockerfile | 26 ------------- packaging/rpm/fedora-34/Dockerfile | 24 ------------ packaging/rpm/fedora-36/Dockerfile | 24 ------------ .../rpm/{fedora-33 => fedora-39}/Dockerfile | 2 +- .../rpm/{fedora-35 => fedora-40}/Dockerfile | 2 +- 14 files changed, 12 insertions(+), 256 deletions(-) delete mode 100644 packaging/deb/ubuntu-cosmic/Dockerfile delete mode 100644 packaging/deb/ubuntu-disco/Dockerfile delete mode 100644 packaging/deb/ubuntu-eoan/Dockerfile rename packaging/deb/{ubuntu-bionic => ubuntu-noble}/Dockerfile (97%) delete mode 100644 packaging/rpm/centos-7/Dockerfile delete mode 100644 packaging/rpm/centos-8/Dockerfile delete mode 100644 packaging/rpm/centos-stream/Dockerfile delete mode 100644 packaging/rpm/fedora-34/Dockerfile delete mode 100644 packaging/rpm/fedora-36/Dockerfile rename packaging/rpm/{fedora-33 => fedora-39}/Dockerfile (97%) rename packaging/rpm/{fedora-35 => fedora-40}/Dockerfile (97%) diff --git a/packaging/README.md b/packaging/README.md index 033eba728..eb6781783 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -4,14 +4,13 @@ This repo contains the open source scripts for packaging cri-docker The scripts will build for this list of packages types: -* DEB packages for Ubuntu 19.04 Disco -* DEB packages for Ubuntu 18.10 Cosmic +* DEB packages for Ubuntu 24.04 Noble +* DEB packages for Ubuntu 22.04 Jammy +* DEB packages for Ubuntu 20.04 Focal * DEB packages for Ubuntu 18.04 Bionic * DEB packages for Ubuntu 16.04 Xenial * DEB packages for Debian 10 Buster * DEB packages for Debian 9 Stretch -* RPM packages for Fedora 31 -* RPM packages for Fedora 30 -* RPM packages for Fedora 29 -* RPM packages for CentOS 7 +* RPM packages for Fedora 40 +* RPM packages for Fedora 39 * TGZ and ZIP files with static binaries diff --git a/packaging/deb/Makefile b/packaging/deb/Makefile index 91c98f80a..ede8b2acd 100644 --- a/packaging/deb/Makefile +++ b/packaging/deb/Makefile @@ -37,8 +37,8 @@ SOURCE_FILES=app.tgz cri-docker.service cri-docker.socket SOURCES=$(addprefix sources/, $(SOURCE_FILES)) DEBIAN_VERSIONS := debian-bullseye debian-bookworm -#UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco ubuntu-eoan -UBUNTU_VERSIONS := ubuntu-bionic ubuntu-focal ubuntu-jammy +#UBUNTU_VERSIONS := ubuntu-xenial +UBUNTU_VERSIONS := ubuntu-bionic ubuntu-focal ubuntu-jammy ubuntu-noble RASPBIAN_VERSIONS := raspbian-bullseye DISTROS := $(DEBIAN_VERSIONS) $(UBUNTU_VERSIONS) $(RASPBIAN_VERSIONS) diff --git a/packaging/deb/ubuntu-cosmic/Dockerfile b/packaging/deb/ubuntu-cosmic/Dockerfile deleted file mode 100644 index b8933f93a..000000000 --- a/packaging/deb/ubuntu-cosmic/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=ubuntu -ARG SUITE=cosmic -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} - -# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639 -RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \ - rm -f /usr/bin/man; \ - dpkg-divert --quiet --remove --rename /usr/bin/man; \ - fi - -RUN apt-get update && apt-get install -y curl devscripts equivs git - -ENV GOPROXY=direct -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -ARG COMMON_FILES -COPY ${COMMON_FILES} /root/build-deb/debian -RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control - -COPY sources/ /sources -ARG DISTRO -ARG SUITE -ENV DISTRO=${DISTRO} -ENV SUITE=${SUITE} - -COPY --from=golang /usr/local/go /usr/local/go - -WORKDIR /root/build-deb -COPY build-deb /root/build-deb/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/packaging/deb/ubuntu-disco/Dockerfile b/packaging/deb/ubuntu-disco/Dockerfile deleted file mode 100644 index 03eba1071..000000000 --- a/packaging/deb/ubuntu-disco/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=ubuntu -ARG SUITE=disco -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} - -# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639 -RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \ - rm -f /usr/bin/man; \ - dpkg-divert --quiet --remove --rename /usr/bin/man; \ - fi - -RUN apt-get update && apt-get install -y curl devscripts equivs git - -ENV GOPROXY=direct -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -ARG COMMON_FILES -COPY ${COMMON_FILES} /root/build-deb/debian -RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control - -COPY sources/ /sources -ARG DISTRO -ARG SUITE -ENV DISTRO=${DISTRO} -ENV SUITE=${SUITE} - -COPY --from=golang /usr/local/go /usr/local/go - -WORKDIR /root/build-deb -COPY build-deb /root/build-deb/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/packaging/deb/ubuntu-eoan/Dockerfile b/packaging/deb/ubuntu-eoan/Dockerfile deleted file mode 100644 index 94d02d248..000000000 --- a/packaging/deb/ubuntu-eoan/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=ubuntu -ARG SUITE=eoan -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} - -# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639 -RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \ - rm -f /usr/bin/man; \ - dpkg-divert --quiet --remove --rename /usr/bin/man; \ - fi - -RUN apt-get update && apt-get install -y curl devscripts equivs git - -ENV GOPROXY=direct -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -ARG COMMON_FILES -COPY ${COMMON_FILES} /root/build-deb/debian -RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control - -COPY sources/ /sources -ARG DISTRO -ARG SUITE -ENV DISTRO=${DISTRO} -ENV SUITE=${SUITE} - -COPY --from=golang /usr/local/go /usr/local/go - -WORKDIR /root/build-deb -COPY build-deb /root/build-deb/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/packaging/deb/ubuntu-bionic/Dockerfile b/packaging/deb/ubuntu-noble/Dockerfile similarity index 97% rename from packaging/deb/ubuntu-bionic/Dockerfile rename to packaging/deb/ubuntu-noble/Dockerfile index 37c0f0c08..34ad0b9ba 100644 --- a/packaging/deb/ubuntu-bionic/Dockerfile +++ b/packaging/deb/ubuntu-noble/Dockerfile @@ -1,6 +1,6 @@ ARG GO_IMAGE ARG DISTRO=ubuntu -ARG SUITE=bionic +ARG SUITE=noble ARG BUILD_IMAGE=${DISTRO}:${SUITE} FROM ${GO_IMAGE} AS golang diff --git a/packaging/rpm/Makefile b/packaging/rpm/Makefile index 88aa406fc..abd2ed9e8 100644 --- a/packaging/rpm/Makefile +++ b/packaging/rpm/Makefile @@ -42,8 +42,8 @@ RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) SOURCE_FILES=app.tgz cri-docker.service cri-docker.socket LICENSE SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) -FEDORA_RELEASES := fedora-36 fedora-35 -CENTOS_RELEASES := centos-stream centos-7 +FEDORA_RELEASES := fedora-39 fedora-40 +CENTOS_RELEASES := .PHONY: help help: ## show make targets diff --git a/packaging/rpm/centos-7/Dockerfile b/packaging/rpm/centos-7/Dockerfile deleted file mode 100644 index 8ae3ed576..000000000 --- a/packaging/rpm/centos-7/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=centos -ARG SUITE=7 -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} -ENV GOPROXY=direct -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"] diff --git a/packaging/rpm/centos-8/Dockerfile b/packaging/rpm/centos-8/Dockerfile deleted file mode 100644 index cf077499b..000000000 --- a/packaging/rpm/centos-8/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -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 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 yum-utils -RUN dnf config-manager --set-enabled powertools -COPY SPECS /root/rpmbuild/SPECS -# Overwrite repo that was failing on aarch64 -RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec -COPY --from=golang /usr/local/go /usr/local/go -WORKDIR /root/rpmbuild -ENTRYPOINT ["/bin/rpmbuild"] diff --git a/packaging/rpm/centos-stream/Dockerfile b/packaging/rpm/centos-stream/Dockerfile deleted file mode 100644 index 7338eef03..000000000 --- a/packaging/rpm/centos-stream/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=tgagor/centos -ARG SUITE=stream8 -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} -ENV GOPROXY=direct -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 yum-utils -RUN dnf config-manager --set-enabled powertools -COPY SPECS /root/rpmbuild/SPECS -# Overwrite repo that was failing on aarch64 -RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec -COPY --from=golang /usr/local/go /usr/local/go -WORKDIR /root/rpmbuild -ENTRYPOINT ["/bin/rpmbuild"] diff --git a/packaging/rpm/fedora-34/Dockerfile b/packaging/rpm/fedora-34/Dockerfile deleted file mode 100644 index 16e72a573..000000000 --- a/packaging/rpm/fedora-34/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=fedora -ARG SUITE=34 -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} -ENV GOPROXY=direct -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 dnf install -y rpm-build rpmlint dnf-plugins-core -COPY SPECS /root/rpmbuild/SPECS -RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec -COPY --from=golang /usr/local/go /usr/local/go -WORKDIR /root/rpmbuild -ENTRYPOINT ["/bin/rpmbuild"] diff --git a/packaging/rpm/fedora-36/Dockerfile b/packaging/rpm/fedora-36/Dockerfile deleted file mode 100644 index 16823e93d..000000000 --- a/packaging/rpm/fedora-36/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=fedora -ARG SUITE=36 -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} -ENV GOPROXY=direct -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 dnf install -y rpm-build rpmlint dnf-plugins-core -COPY SPECS /root/rpmbuild/SPECS -RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec -COPY --from=golang /usr/local/go /usr/local/go -WORKDIR /root/rpmbuild -ENTRYPOINT ["/bin/rpmbuild"] diff --git a/packaging/rpm/fedora-33/Dockerfile b/packaging/rpm/fedora-39/Dockerfile similarity index 97% rename from packaging/rpm/fedora-33/Dockerfile rename to packaging/rpm/fedora-39/Dockerfile index d0afa38ed..4fdb102f1 100644 --- a/packaging/rpm/fedora-33/Dockerfile +++ b/packaging/rpm/fedora-39/Dockerfile @@ -1,6 +1,6 @@ ARG GO_IMAGE ARG DISTRO=fedora -ARG SUITE=33 +ARG SUITE=39 ARG BUILD_IMAGE=${DISTRO}:${SUITE} FROM ${GO_IMAGE} AS golang diff --git a/packaging/rpm/fedora-35/Dockerfile b/packaging/rpm/fedora-40/Dockerfile similarity index 97% rename from packaging/rpm/fedora-35/Dockerfile rename to packaging/rpm/fedora-40/Dockerfile index b914fcf8c..48aa32239 100644 --- a/packaging/rpm/fedora-35/Dockerfile +++ b/packaging/rpm/fedora-40/Dockerfile @@ -1,6 +1,6 @@ ARG GO_IMAGE ARG DISTRO=fedora -ARG SUITE=35 +ARG SUITE=40 ARG BUILD_IMAGE=${DISTRO}:${SUITE} FROM ${GO_IMAGE} AS golang From 518139087371c0345aa9759c418fbd01e6ccd217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 27 Aug 2024 11:45:40 +0200 Subject: [PATCH 2/2] Add package for AlmaLinux EL compatible Should be compatible with CentOS and RHEL Remove dependency for libcgroup, on .el9 --- packaging/README.md | 2 ++ packaging/rpm/Makefile | 12 ++++++++---- packaging/rpm/SPECS/cri-dockerd.spec | 3 +++ packaging/rpm/almalinux-8/Dockerfile | 24 ++++++++++++++++++++++++ packaging/rpm/almalinux-9/Dockerfile | 24 ++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 packaging/rpm/almalinux-8/Dockerfile create mode 100644 packaging/rpm/almalinux-9/Dockerfile diff --git a/packaging/README.md b/packaging/README.md index eb6781783..effb5962f 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -13,4 +13,6 @@ The scripts will build for this list of packages types: * DEB packages for Debian 9 Stretch * RPM packages for Fedora 40 * RPM packages for Fedora 39 +* RPM packages for AlmaLinux 8 +* RPM packages for AlmaLinux 9 * TGZ and ZIP files with static binaries diff --git a/packaging/rpm/Makefile b/packaging/rpm/Makefile index abd2ed9e8..e355d4c11 100644 --- a/packaging/rpm/Makefile +++ b/packaging/rpm/Makefile @@ -44,6 +44,7 @@ SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-39 fedora-40 CENTOS_RELEASES := +ALMALINUX_RELEASES := almalinux-8 almalinux-9 .PHONY: help help: ## show make targets @@ -55,16 +56,19 @@ clean: ## remove build artifacts $(RM) -r rpmbuild/ .PHONY: rpm -rpm: fedora centos ## build all rpm packages +rpm: fedora centos almalinux ## build all rpm packages .PHONY: fedora fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages .PHONY: centos -centos: $(CENTOS_RELEASES) ## build all centos rpm packages +centos: $(CENTOS_RELEASES) ## build all centos stream rpm packages -.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES) -$(FEDORA_RELEASES) $(CENTOS_RELEASES): $(SOURCES) +.PHONY: almalinux +almalinux: $(ALMALINUX_RELEASES) ## build all almalinux rpm packages + +.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(ALMALINUX_RELEASES) +$(FEDORA_RELEASES) $(CENTOS_RELEASES) $(ALMALINUX_RELEASES): $(SOURCES) @echo "${APP_DIR}" @echo "${VERSION}" @echo "$(shell ./gen-rpm-ver $(APP_DIR) $(VERSION))" diff --git a/packaging/rpm/SPECS/cri-dockerd.spec b/packaging/rpm/SPECS/cri-dockerd.spec index a5be5a1c5..ac5ca2e1b 100644 --- a/packaging/rpm/SPECS/cri-dockerd.spec +++ b/packaging/rpm/SPECS/cri-dockerd.spec @@ -25,8 +25,11 @@ Requires: (iptables or nftables) Requires: iptables %endif %if %{undefined suse_version} +%if %{undefined rhel} || 0%{?rhel} < 9 +# Libcgroup is no longer available in RHEL/CentOS >= 9 distros. Requires: libcgroup %endif +%endif Requires: containerd.io >= 1.2.2-3 Requires: tar Requires: xz diff --git a/packaging/rpm/almalinux-8/Dockerfile b/packaging/rpm/almalinux-8/Dockerfile new file mode 100644 index 000000000..c34f3ddec --- /dev/null +++ b/packaging/rpm/almalinux-8/Dockerfile @@ -0,0 +1,24 @@ +ARG GO_IMAGE +ARG DISTRO=almalinux +ARG SUITE=8 +ARG BUILD_IMAGE=${DISTRO}:${SUITE} + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ARG DISTRO +ARG SUITE +ENV DISTRO ${DISTRO} +ENV SUITE ${SUITE} +ENV GOPROXY=direct +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 +RUN yum install -y rpm-build rpmlint +COPY SPECS /root/rpmbuild/SPECS +RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go/ +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"] diff --git a/packaging/rpm/almalinux-9/Dockerfile b/packaging/rpm/almalinux-9/Dockerfile new file mode 100644 index 000000000..0bd433847 --- /dev/null +++ b/packaging/rpm/almalinux-9/Dockerfile @@ -0,0 +1,24 @@ +ARG GO_IMAGE +ARG DISTRO=almalinux +ARG SUITE=9 +ARG BUILD_IMAGE=${DISTRO}:${SUITE} + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ARG DISTRO +ARG SUITE +ENV DISTRO ${DISTRO} +ENV SUITE ${SUITE} +ENV GOPROXY=direct +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 +RUN yum install -y rpm-build rpmlint +COPY SPECS /root/rpmbuild/SPECS +RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go/ +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"]