Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,21 @@ jobs:
echo "EVENT NAME: ${{ github.event.name }}"
echo "MERGED: ${{ github.event.pull_request.merged }}"

# create the docker images with the user and group IDs
# set to 55172 (randomly chosen number unlikely to conflict
# with existing users). this helps to set permissions local
# file management with pulled images. Specifically, the
# following will make the xfer directory writeable by the
# images:
# sudo chown -R 55172:55172 $PDO_SOURCE_ROOT/docker/xfer
Copy link
Contributor

@g2flyer g2flyer Dec 12, 2024

Choose a reason for hiding this comment

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

hmm, isn't just changing group (chgrp -R pdo_group $PDO_SOURCE_ROOT/docker/xfer) the only thing you need (and if you are in that group wouldn't need sudo)?

But you also would have to make sure it is group writeable Unfortunately it doesn't seem there is an easy way to define a specific umask for both build and run. Probably easiest just do chmod -R g+w at end? Or could pre-set sticky bits on the directory come to the rescue? as long as we do not create new directories during build (as currently), not having group-write on the created files is actually at least as far as make clean goes. The only case i could somewhat see as problematic is if user has umask 077 and you want to read files? But then i guess nowadays this umask is not very common and probably the scenario neither ...

Also the actual user running should be in that new group? (i.e., you might also want to add the convenience comments on the sudo groupadd pdo_group and sudo usermod $(USER) -a -G pdo_group?)

Also, why not even add a make command to do these changes? And i guess there should ideally also be a docu-update?

- name: Build Docker Images
env:
PDO_INTERPRETER: wawaka
PDO_LOG_LEVEL: warning
run: |
git checkout -b ci-test-branch
. build/common-config.sh
make -C docker
make -C docker PDO_USER_UID=55172 PDO_GROUP_UID=55172

- name: Login to the ghcr.io Container Registry
uses: docker/login-action@v2
Expand Down