Closed jasonterando closed 1 year ago
Hi, thanks for the feedback, and thanks for confirming it's good on Windows. If I'm reading correctly, seems like I need to address the following:
id
to get the infoAssuming I do #1, #2 and #4 -- and we decide on #3, is there anything else you need from me to proceed? Thanks!
Thanks for the quick follow up @jasonterando! The only thing I would add is that there are still some changes for using dictionary in the CLI args. I didn't look at those changes too closely, but seems like all of those could go in another PR. I'll need one of the repo contributors to review this too, since I don't have write access to this repository.
Okee doke - I think I finally have the dictionary/parameters thing completely cleared out (I learned my lesson, I will remember next time to not do a PR from local master branch, sorry about the hassle). Let me know if there is anything else before you feed this up the food chain.
@normj Is there some from this repo who can review this? I also reproduced the problem on Ubuntu and verified that this fixes it.
@normj Is there some from this repo who can review this? I also reproduced the problem on Ubuntu and verified that this fixes it.
Back from winter holidays and added comments.
Hi, I've posted an update with changes as follows:
Unit and integration test all run ok. I do not have Visual Studio to confirm things are running OK there.
FWIW, I tested the latest commit 625bd4f on Ubuntu as root and non-root and both worked. When running as root, the -u argument isn't passed, as expected.
Hi, is there anything else required for this review?
@jasonterando Nothing more you need to do right now. The change looks good to me and I have run the code through its paces. I need to get somebody else on the team to double check the change and assuming nothing else found we can get the change released.
This was released this morning in version 5.6.3 of Amazon.Lambda.Tools
This is related to Issue #256
Description of Change: Update
dotnet lambda package
so that it launches Docker as the logged in user when being run in Linux or a MacOS. This will allowdotnet lambda deploy-function
to successfully create the .zip package on Linux. This change also has the benfit of not leaving directories around that users have tochown
or login in as root to clean up. This will allow non-root developers to successfully usedotnet lambda
to package and deploy.Recap of Issue: When
dotnet lambda package
today builds a project for linux-x64, it launches a Docker container. Within the container, commands are executed which create /obj and /bin directories using the Docker container's effective user, which is "root". When deploying the package,dotnet lambda deploy-function
attempts to build a .zip within these created directories, and fails, unless the active user is logged in as "root", which is not a good thing to do when you are developing.Implementation Details:
id
to get the user's User ID and Group ID (unit test PosixUserHelperTest.cs)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.