Skip to content

Commit

Permalink
rpm: minimal RHEL support
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Neergaard <[email protected]>
  • Loading branch information
neersighted authored and thaJeztah committed Jun 5, 2024
1 parent 5d3df69 commit dd0e848
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ endif
# make quay.io/centos/centos:stream8
#
# It is a shorthand for "make BUILD_IMAGE=mydistro:version build"
.PHONY: docker.io/% quay.io/%
docker.io/% quay.io/%:
.PHONY: docker.io/% quay.io/% registry.access.redhat.com/%
docker.io/% quay.io/% registry.access.redhat.com/%:
$(MAKE) BUILD_IMAGE="$@" build

.PHONY: checkout
Expand Down Expand Up @@ -97,6 +97,8 @@ build:

@set -x; DOCKER_BUILDKIT=1 docker build \
--pull \
--build-arg RH_USER=$(RH_USER) \
--build-arg RH_PASS=$(RH_PASS) \
--platform linux/$(ARCH) \
--build-arg GOLANG_IMAGE="$(GOLANG_IMAGE)" \
--build-arg BUILD_IMAGE="$(BUILD_IMAGE)" \
Expand Down
5 changes: 5 additions & 0 deletions dockerfiles/rpm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ FROM ${BUILD_IMAGE} AS redhat-base
RUN yum install -y yum-utils rpm-build git

FROM redhat-base AS rhel-base
ARG RH_USER
ARG RH_PASS
RUN rm /etc/rhsm-host
RUN subscription-manager register --username=$RH_USER --password=$RH_PASS
RUN subscription-manager repos --enable codeready-builder-for-rhel-$(source /etc/os-release && echo "${VERSION_ID%.*}")-$(arch)-rpms

FROM redhat-base AS centos-base
# Using a wildcard: CentOS 7 uses "CentOS-RepoName", CentOS 8 uses "CentOS-Linux-RepoName"
Expand Down

0 comments on commit dd0e848

Please sign in to comment.