Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: Use secret for ROSIPW on RHEL7 build dockerfile #3320

Merged
merged 1 commit into from
Jan 9, 2024
Merged
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
7 changes: 3 additions & 4 deletions ansible/docker/Dockerfile.RHEL7
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM registry.access.redhat.com/rhel7
# This dockerfile should be built using:
# docker build --no-cache -t rhel7_build_image -f ansible/docker/Dockerfile.RHEL7 --build-arg ROSIUSER=******* --build-arg ROSIPW=******* --build-arg git_sha=******* `pwd`
# This dockerfile should be built using this from the top level of the repository:
# ROSIPW=******* docker build --no-cache -t rhel7_build_image -f ansible/docker/Dockerfile.RHEL7 --build-arg ROSIUSER=******* --secret id=ROSIPW --build-arg git_sha="$(git rev-parse --short HEAD)" `pwd`
ARG ROSIUSER
ARG ROSIPW
RUN sed -i 's/\(def in_container():\)/\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py
RUN subscription-manager register --username=${ROSIUSER} --password=${ROSIPW} --auto-attach
RUN --mount=type=secret,id=ROSIPW,required=true subscription-manager register --username=${ROSIUSER} --password="$(cat /run/secrets/ROSIPW)" --auto-attach
RUN subscription-manager repos --enable rhel-7-for-system-z-optional-rpms
# ^^ Optional repo needed for Xvfb

Expand Down
Loading