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

fix(core): asset bundling runs as root #8492

Merged
merged 6 commits into from
Jun 11, 2020
Merged

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Jun 11, 2020

Get uid and gid of current user and pass it to docker run to avoid
running the container as root. On Windows, use 1000:1000 as default.

Add user to BundlingOptions.

Fixes #8489


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Get `uid` and `gid` of current user and pass it to `docker run` to avoid
running the container as `root`.

On Windows, `docker` always runs as the current user so we can skip
this.

Fixes aws#8489
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 54b7c04
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 740c1a3
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jogold
Copy link
Contributor Author

jogold commented Jun 11, 2020

@eladb I think this needs #8481 for the build to succeed

EDIT: actually I'm not sure 1000:1000 will correctly work in CI

@eladb
Copy link
Contributor

eladb commented Jun 11, 2020

@eladb I think this needs #8481 for the build to succeed

EDIT: actually I'm not sure 1000:1000 will correctly work in CI

In master now

@jogold
Copy link
Contributor Author

jogold commented Jun 11, 2020

@eladb do you think uid and gid should be exposed in BundlingOptions?

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 5ba67fa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@eladb
Copy link
Contributor

eladb commented Jun 11, 2020

@eladb do you think uid and gid should be exposed in BundlingOptions?

Eventually they will be requested.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 19a6bfd
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 11, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

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.

Custom asset bundling for lambda using docker results in output code that is owned by root
3 participants