Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions distros.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,15 @@
"description": "Red Hat Enterprise Linux 9",
"end_of_life": "05-2032",
"end_of_support": "05-2027"
},
"rhel-10": {
"image": "registry.access.redhat.com/ubi10/ubi",
"arches": [
"amd64",
"aarch64"
],
"description": "Red Hat Enterprise Linux 10",
"end_of_life": "05-2035",
"end_of_support": "05-2030"
}
}
2 changes: 1 addition & 1 deletion rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ RUN?=docker run --rm \

FEDORA_RELEASES ?= fedora-41 fedora-42
CENTOS_RELEASES ?= centos-9 centos-10
RHEL_RELEASES ?= rhel-8 rhel-9
RHEL_RELEASES ?= rhel-8 rhel-9 rhel-10

DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES)
BUNDLES := $(patsubst %,rpmbuild/bundles-ce-%-$(DPKG_ARCH).tar.gz,$(DISTROS))
Expand Down
45 changes: 45 additions & 0 deletions rpm/rhel-10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax=docker/dockerfile:1

ARG GO_IMAGE=golang:latest
ARG DISTRO=rhel
ARG SUITE=10
ARG BUILD_IMAGE=registry.access.redhat.com/ubi10/ubi

FROM ${GO_IMAGE} AS golang

FROM ${BUILD_IMAGE} AS subscribed-image
RUN --mount=type=secret,id=rh-user --mount=type=secret,id=rh-pass <<-EOT
rm -f /etc/rhsm-host

if [ ! -f /run/secrets/rh-user ] || [ ! -f /run/secrets/rh-pass ]; then
echo "Either RH_USER or RH_PASS is not set. Running build without subscription."
else
subscription-manager register \
--username="$(cat /run/secrets/rh-user)" \
--password="$(cat /run/secrets/rh-pass)"

subscription-manager repos --enable codeready-builder-for-rhel-10-$(arch)-rpms
# dnf config-manager --set-enabled codeready-builder-for-rhel-10-$(arch)-rpms
fi
EOT

FROM subscribed-image

ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}

RUN dnf install -y rpm-build
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]