Skip to content

Commit

Permalink
Set UID and GID for github generated docker images
Browse files Browse the repository at this point in the history
Explicitly set the user and group ids for images that will
be pushed ghcr by the docker workflow. This makes it easier
to manage permissions of the xfer directory when using images
from the registry.

Signed-off-by: Mic Bowman <[email protected]>
  • Loading branch information
cmickeyb committed Dec 13, 2024
1 parent 4f44384 commit b89e3b6
Showing 1 changed file with 8 additions and 1 deletion.
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
- 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

0 comments on commit b89e3b6

Please sign in to comment.