Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #436 from jupierce/final_user
Browse files Browse the repository at this point in the history
Apply final_user for ci alignment base images
  • Loading branch information
jupierce authored Jun 15, 2021
2 parents 856461c + 91fb68b commit b974d0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doozerlib/cli/images_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ def add_localdev_repo_profile(profile):
dfp.add_lines("RUN yum-config-manager --save '--setopt=skip_if_unavailable=True'")
dfp.add_lines("RUN yum-config-manager --save '--setopt=*.skip_if_unavailable=True'")

if config.final_user:
# If the image should not run as root/0, then allow metadata to specify a
# true final user.
dfp.add_lines(f'USER {config.final_user}')

# We've arrived at a Dockerfile.
dockerfile_content = dfp.content

Expand Down

0 comments on commit b974d0c

Please sign in to comment.