-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 dotnet lambda container builds #4665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first pass with some feedback.
Thank you for adding integration tests but please make sure you are also adding unit tests to cover your changes.
@Beau-Gosse-dev @jfuss @mndeveci thank you for reviewing this PR. Push two commits with one addressing comments, another one updating/adding unit tests. Will look into windows-integ failure |
@@ -78,6 +78,7 @@ def __init__( | |||
locate_layer_nested: bool = False, | |||
hook_name: Optional[str] = None, | |||
build_in_source: Optional[bool] = None, | |||
mount_with=MountMode.READ.value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mount_with=MountMode.READ.value, | |
mount_with: MountMode = MountMode.READ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Click.Choice takes [str] only. Workaround: Convert str to enum in BuildContext.init()
self._mount_with = MountMode(mount_with) |
…-cli into mount_with_write
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the comments, looking forward to ship this feature soon! 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @mrkdeng for handling all the feedback along the way. I know that can be a lot and time consuming but I think we ended up in a good state as a result.
Which issue(s) does this change fix?
#4453
Why is this change necessary?
How does it address the issue?
--mount-with [READ|WRITE]
that enables mounting source code directory with READ/WRITE permissions. Then run Docker as a non-root user (unless current user is root) if mount with write, which gives user the least privilege--mount-with WRITE
to be specified. If building without explicit--mount-with
, a confirmation dialog pops up and asks write permissions to source code directory--mount-with WRITE
What side effects does this change have?
There is permission issue when running .NET image as non-root user #7868. This change relies on docker images to set environment variables such as
DOTNET_CLI_HOME
,XDG_DATA_HOME
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.