Skip to content

Commit 2c1d870

Browse files
authored
Revert "Use Red Hat subscription in RHEL image (#433)" (#434)
This reverts commit 49cd10a.
1 parent 49cd10a commit 2c1d870

File tree

4 files changed

+8
-22
lines changed

4 files changed

+8
-22
lines changed

.circleci/config.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,7 @@ workflows:
809809
- upload-dumps-for-embedding-into-image
810810
- build-rhel:
811811
<<: *runOnAllTags
812-
context:
813-
- docker-io-and-stackrox-io-push
814-
- redhat-developer-account-login
812+
context: docker-io-and-stackrox-io-push
815813
requires:
816814
- create-postgres-dump-from-genesis-dump
817815
- upload-dumps-for-embedding-into-image
@@ -871,9 +869,7 @@ workflows:
871869
- upload-dumps-for-embedding-into-image
872870
- build-rhel:
873871
<<: *runOnAllTags
874-
context:
875-
- docker-io-and-stackrox-io-push
876-
- redhat-developer-account-login
872+
context: docker-io-and-stackrox-io-push
877873
requires:
878874
- create-postgres-dump-from-genesis-dump
879875
- upload-dumps-for-embedding-into-image

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ $(CURDIR)/image/db/rhel/bundle.tar.gz:
177177
.PHONY: scanner-image-rhel
178178
scanner-image-rhel: scanner-rhel-build-dockerized $(CURDIR)/image/scanner/rhel/bundle.tar.gz
179179
@echo "+ $@"
180-
@docker build --build-arg REDHAT_USERNAME="${REDHAT_USERNAME}" --build-arg REDHAT_PASSWORD="${REDHAT_PASSWORD}" -t us.gcr.io/stackrox-ci/scanner-rhel:$(TAG) -f image/scanner/rhel/Dockerfile image/scanner/rhel
180+
@docker build -t us.gcr.io/stackrox-ci/scanner-rhel:$(TAG) -f image/scanner/rhel/Dockerfile image/scanner/rhel
181181

182182
.PHONY: db-image
183183
db-image:
@@ -191,7 +191,7 @@ db-image:
191191
db-image-rhel: $(CURDIR)/image/db/rhel/bundle.tar.gz
192192
@echo "+ $@"
193193
@test -f image/db/dump/definitions.sql.gz || { echo "FATAL: No definitions dump found in image/dump/definitions.sql.gz. Exiting..."; exit 1; }
194-
@docker build --build-arg REDHAT_USERNAME="${REDHAT_USERNAME}" --build-arg REDHAT_PASSWORD="${REDHAT_PASSWORD}" -t us.gcr.io/stackrox-ci/scanner-db-rhel:$(TAG) -f image/db/rhel/Dockerfile image/db/rhel
194+
@docker build -t us.gcr.io/stackrox-ci/scanner-db-rhel:$(TAG) -f image/db/rhel/Dockerfile image/db/rhel
195195

196196
.PHONY: deploy
197197
deploy: clean-helm-rendered

image/db/rhel/Dockerfile

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_REGISTRY=registry.access.redhat.com
22
ARG BASE_IMAGE=ubi8/ubi
3-
ARG BASE_TAG=8.4
3+
ARG BASE_TAG=8.3
44

55
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS extracted_bundle
66
COPY bundle.tar.gz /
@@ -10,9 +10,6 @@ RUN tar -xzf /bundle.tar.gz
1010

1111
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
1212

13-
ARG REDHAT_USERNAME
14-
ARG REDHAT_PASSWORD
15-
1613
LABEL name="scanner-db-rhel" \
1714
vendor="StackRox" \
1815
maintainer="[email protected]" \
@@ -30,9 +27,7 @@ COPY --from=extracted_bundle /bundle/postgres.rpm /bundle/postgres-libs.rpm /bun
3027
COPY --from=extracted_bundle /bundle/etc/postgresql.conf /bundle/etc/pg_hba.conf /etc/
3128
COPY --from=extracted_bundle /bundle/docker-entrypoint-initdb.d/definitions.sql.gz /docker-entrypoint-initdb.d/
3229

33-
RUN subscription-manager register --username "${REDHAT_USERNAME}" --password "${REDHAT_PASSWORD}" && \
34-
subscription-manager attach && \
35-
groupadd -g 70 postgres && \
30+
RUN groupadd -g 70 postgres && \
3631
adduser postgres -u 70 -g 70 -d /var/lib/postgresql -s /bin/sh && \
3732
rpm --import RPM-GPG-KEY-PGDG-12 && \
3833
dnf upgrade -y && \

image/scanner/rhel/Dockerfile

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_REGISTRY=registry.access.redhat.com
22
ARG BASE_IMAGE=ubi8/ubi
3-
ARG BASE_TAG=8.4
3+
ARG BASE_TAG=8.3
44

55
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS extracted_bundle
66

@@ -10,9 +10,6 @@ RUN tar -xzf /bundle.tar.gz
1010

1111
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
1212

13-
ARG REDHAT_USERNAME
14-
ARG REDHAT_PASSWORD
15-
1613
LABEL name="scanner-rhel" \
1714
vendor="StackRox" \
1815
maintainer="[email protected]" \
@@ -32,9 +29,7 @@ COPY --from=extracted_bundle "/bundle${NVD_DEFINITIONS_DIR}/" ".${NVD_DEFINITION
3229
COPY --from=extracted_bundle "/bundle${K8S_DEFINITIONS_DIR}/" ".${K8S_DEFINITIONS_DIR}/"
3330
COPY --from=extracted_bundle "/bundle${REPO_TO_CPE_DIR}/" ".${REPO_TO_CPE_DIR}/"
3431

35-
RUN subscription-manager register --username "${REDHAT_USERNAME}" --password "${REDHAT_PASSWORD}" && \
36-
subscription-manager attach && \
37-
dnf upgrade -y && \
32+
RUN dnf upgrade -y && \
3833
dnf install -y ca-certificates xz && \
3934
dnf clean all && \
4035
rm -rf /var/cache/dnf && \

0 commit comments

Comments
 (0)