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

Improve container usability #59

Merged
merged 4 commits into from
May 16, 2024

Conversation

h0tw1r3
Copy link
Contributor

@h0tw1r3 h0tw1r3 commented May 4, 2024

automatically manage ownership in container to match host
deprecate /root volume, replaced by /workspace

new entrypoint script:

  • supports docker run --workdir
  • creates a user in the container with the same uid and gid of the volume
    mapped workspace directory, or the --user parameter, and runs the pdk command
    as that user in the container. With one exception, if the workspace
    directory is owned by root on the host
  • support for volume mapping pdk cache to /cache
  • failure message, if /workspace is not mapped (or writable)
  • warning message, if /workspace or /cache have owners or permissions that
    may not work
  • startup message, if /cache is not mounted in container (performance)

deprecate /root volume, replaced by /workspace

new entrypoint script:

* creates a user in the container with the same uid and gid of the volume
  mapped workspace directory, or the --user parameter, and runs the pdk command
  as that user in the container. With one exception, if the workspace
  directory is owned by root on the host
* support for volume mapping pdk cache to /cache
* failure message, if /workspace is not mapped (or writable)
* warning message, if /workspace or /cache have owners or permissions that
  may not work
* startup message, if /cache is not mounted in container (performance)
@h0tw1r3 h0tw1r3 added the enhancement New feature or request label May 4, 2024
@h0tw1r3 h0tw1r3 force-pushed the quality-of-life branch 6 times, most recently from 0f09829 to 5960527 Compare May 4, 2024 02:39
@h0tw1r3 h0tw1r3 marked this pull request as ready for review May 4, 2024 02:41
@h0tw1r3 h0tw1r3 requested a review from a team as a code owner May 4, 2024 02:41
@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented May 4, 2024

Should address #39

@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented May 6, 2024

Wondering if cache should default to inside the workdir. Like /workdir/tmp/docker. tmp is in the pdk template gitignore.

@h0tw1r3 h0tw1r3 force-pushed the quality-of-life branch 3 times, most recently from 215ad01 to 587ec94 Compare May 14, 2024 20:13
@CLAassistant
Copy link

CLAassistant commented May 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@gavindidrichsen gavindidrichsen left a comment

Choose a reason for hiding this comment

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

LGTM

@gavindidrichsen gavindidrichsen merged commit ba400c9 into puppetlabs:main May 16, 2024
2 checks passed
@h0tw1r3 h0tw1r3 deleted the quality-of-life branch May 23, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants