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

feat: support non-root user #38

Merged
merged 3 commits into from
May 13, 2024
Merged

feat: support non-root user #38

merged 3 commits into from
May 13, 2024

Conversation

matt-FFFFFF
Copy link
Member

@matt-FFFFFF matt-FFFFFF commented May 3, 2024

This PR adds support for running as non-root user. It corrects some errors with the go installation.

It will enable us to modify the avm script file to pass in the current user/group.

This will resolve local permissions errors running the container on a developer machine. Currently any files created whilst in the container are owned by root:root.

After this is merged we will pass in --user "$(id -u):$(id -g)" to the docker command to run as the current user. We could also optionally mount /etc/passwd to allow correct user mapping.

We will ask developers to run the following command to fix any files owned by root:

find -user 0 | xargs sudo chown "$(id -u):$(id -g)"

It also bumps TF to 1.8.2 and removes some unused ARGS.

@matt-FFFFFF matt-FFFFFF requested a review from lonegunmanb May 3, 2024 10:03
Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

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

LGTM!

@lonegunmanb
Copy link
Member

I'm merging this pr whilst trivy check failed. I'll fix trivy issues later.

@lonegunmanb lonegunmanb merged commit cdef5b5 into main May 13, 2024
1 of 2 checks passed
@matt-FFFFFF matt-FFFFFF deleted the feat/supportNonRootUser branch May 14, 2024 08:44
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.

2 participants