Skip to content

feat: update devcontainer to use non-root user 'pymech-user' - #1785

Merged
dipinknair merged 5 commits into
mainfrom
feat/add-user-devcontainer
Oct 20, 2026
Merged

dipinknair merged 5 commits into
mainfrom
feat/add-user-devcontainer

Conversation

@dipinknair

@dipinknair dipinknair commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Updates the dev containers and Docker images to run as a non-root user, pymech-user, instead of root. This improves security and avoids root-owned files in mounted workspaces.

Changes

  • Added creation of the non-root pymech-user to the shared devcontainer Dockerfile and the versioned Docker images (242, 251, 252, 261).
  • Updated all versioned devcontainer.json configurations to use the new non-root user.
  • Adjusted the tests.yml and docs.yml CI workflows to match the new container user setup.
  • Documented the non-root user in the devcontainer README and make_container.rst.

Fixes #574

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Checklist

  • Title follows Conventional Commits (e.g. feat: add modal analysis support)
  • Tests added or updated
  • Documentation updated

@dipinknair
dipinknair requested a review from a team as a code owner October 19, 2026 14:49
@github-actions github-actions Bot added the enhancement New features or code improvements label Oct 19, 2026
@codacy-production

codacy-production Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · -0.48% coverage variation

Metric Results
Coverage variation ✅ -0.48% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a553a62) 3365 2748 81.66%
Head commit (6e7d4e2) 3365 (+0) 2732 (-16) 81.19% (-0.48%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1785) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions github-actions Bot added maintenance Package and maintenance related ci/cd Involves the GitHub workflow files labels Oct 19, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 19, 2026
@dipinknair
dipinknair requested a review from klmcadams October 19, 2026 14:53

@klmcadams klmcadams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.18%. Comparing base (a553a62) to head (6e7d4e2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1785      +/-   ##
==========================================
- Coverage   81.66%   81.18%   -0.48%     
==========================================
  Files          43       43              
  Lines        3365     3365              
==========================================
- Hits         2748     2732      -16     
- Misses        617      633      +16     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dipinknair
dipinknair merged commit c1e38fe into main Oct 20, 2026
60 checks passed
@dipinknair
dipinknair deleted the feat/add-user-devcontainer branch October 20, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Involves the GitHub workflow files documentation Improvements or additions to documentation enhancement New features or code improvements maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add USER to Docker file

3 participants