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

[DEVCONTAINER] support customization and run as non-root user #3270

Merged
merged 12 commits into from
Feb 21, 2025

Conversation

dbarker
Copy link
Contributor

@dbarker dbarker commented Feb 12, 2025

Fixes #3265

Changes

  • Adds a customization script to allow setting matching user uid/gid to the host and additional system packages
  • Adds new docker args and environment variables to set the dependency versions and cxx standard.
  • Installs clang-tidy, shellcheck, and markdownlint-cli
  • Installs compatible versions of abseil-cpp, Protobuf, and gRPC by default - configured so transitive dependencies are found by cmake after install.
  • Runs the devcontainer as a non-root user and overrides the base image entry point to allow interactive bash sessions.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@dbarker dbarker requested a review from a team as a code owner February 12, 2025 00:22
Copy link

netlify bot commented Feb 12, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 9162792
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/67b85f5d9d353b00083393bc

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.41%. Comparing base (a7f9daf) to head (9162792).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3270   +/-   ##
=======================================
  Coverage   89.41%   89.41%           
=======================================
  Files         207      207           
  Lines        6457     6457           
=======================================
  Hits         5773     5773           
  Misses        684      684           

@dbarker dbarker changed the title [DEVCONTAINER] customization for the devcontainer and set non root user [DEVCONTAINER] support customization and run as non-root user Feb 12, 2025
@dbarker dbarker marked this pull request as draft February 13, 2025 22:58
…buf version and compatible abseil version from ci. Override the base image's entrypoint to support running just an interactive bash session in docker. Add a readme with config details.
@dbarker dbarker marked this pull request as ready for review February 18, 2025 04:42
@marcalff
Copy link
Member

Thanks for the PR.

@esigo Could you take a look ? Thanks.

Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

looks perfect
thanks for the pr :)

@marcalff marcalff merged commit 3212b0f into open-telemetry:main Feb 21, 2025
58 checks passed
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.

Dockerfile.dev runs as root and changes ownership of host .git/objects
4 participants