Skip to content

Use go-toolset golang base image for redhat builds#1608

Merged
simonbaird merged 1 commit intoconforma:mainfrom
simonbaird:go-toolset-for-redhat-build-2
May 10, 2024
Merged

Use go-toolset golang base image for redhat builds#1608
simonbaird merged 1 commit intoconforma:mainfrom
simonbaird:go-toolset-for-redhat-build-2

Conversation

@simonbaird
Copy link
Copy Markdown
Member

@simonbaird simonbaird commented May 9, 2024

Use root user instead of the 'default' user from go-toolset to avoid an error like this:

fatal: detected dubious ownership in repository at '/build'
To add an exception for this directory, call:
git config --global --add safe.directory /build

Could also have solved the problem by doing a --chown=default:root when copying in the files.

Ref: https://issues.redhat.com/browse/EC-625

Use root user instead of the 'default' user from go-toolset to avoid
an error like this:

  fatal: detected dubious ownership in repository at '/build'
  To add an exception for this directory, call:
          git config --global --add safe.directory /build

Could also have solved the problem by doing a --chown=default:root
when copying in the files.
@robnester-rh
Copy link
Copy Markdown
Contributor

Does this leave the working user as root and does that present any security concerns?

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.39%. Comparing base (3ce6dd4) to head (5a8f39e).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1608      +/-   ##
==========================================
+ Coverage   80.70%   87.39%   +6.69%     
==========================================
  Files          65       76      +11     
  Lines        4794     5134     +340     
==========================================
+ Hits         3869     4487     +618     
+ Misses        925      647     -278     
Flag Coverage Δ
acceptance 73.07% <ø> (?)
generative 80.70% <ø> (ø)
integration 80.70% <ø> (ø)
unit 80.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 43 files with indirect coverage changes

@simonbaird
Copy link
Copy Markdown
Member Author

Does this leave the working user as root and does that present any security concerns?

No, because it's just the build step. In the final image we have USER 1001.

Copy link
Copy Markdown
Contributor

@robnester-rh robnester-rh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robnester-rh
Copy link
Copy Markdown
Contributor

Does this leave the working user as root and does that present any security concerns?

No, because it's just the build step. In the final image we have USER 1001.

Ack.

@simonbaird simonbaird merged commit 5254953 into conforma:main May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants