This repository was archived by the owner on Apr 30, 2023. It is now read-only.
Open
Conversation
Contributor
Author
|
I'm not convinced this isn't the better way. Trying to get this action to run under a user instead of under root also had a lot of problems. Maybe it would be better to download the aws cli directly instead of through CDK like this other action does? Not sure if that would help. |
Contributor
Author
|
I've created another branch as an alternative if you like that solution better. Not sure which one is better honestly. That branch runs docker under a user called github instead of as root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to enable alpine 3.14 (#41) again so that builds can use npm 7 formatted package files.
This is a super hacky fix, but I couldn't find a better way around this. For some reason when cdk runs it's running as the user 1001 and group 121, but the "cdk.out" folder gets created as root, which cdk doesn't have permissions to write to. This pre-creates the cdk.out directory and changes the owner of it to 1001 so that cdk can write to it.
I wasn't sure if 1001:121 was static or not, and I couldn't find a way to get it from github, so this figures out the user and group id from the
node_modulesfolder and creates a user and group with those ids.The other thing I want to try is having Docker run as a different user besides root, but thought I'd share this hacky solution in the meantime.