Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Allows setting the
--gid
flag topack build
.Use Cases
When running on Github Actions, the host user is 1001. The CNB user in the container is 1000. If you mount a volume in from the host, you cannot write to the volume, because 1000 != 1001. You cannot change the host file owner because the action runs as a non-root user. In addition, you cannot change the user id in the container.
You can set group writable on the host OS & set
pack build --gid 121
(121 is the group on GHA). Then when mounted into the container, the volume is group writable and the build runs with a matching group id, thus you can write to the volume.The need for this is to enable more efficient caching in Paketo Java sample apps. If we can write to
~/.m2
and~/.gradle
which are volume mounted in from the host, we can share and reuse a lot of files, reducing the test times significantly.Checklist