Skip to content

Commit

Permalink
Fix home directory owner in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Feb 18, 2025
1 parent 5928864 commit fcddb3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ca-container-system-service-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- name: Create shared folders in PKI user's home directory
run: |
# create folders with default owner and permissions
docker exec pki ls -lR /home
docker exec -u pkiuser pki mkdir /home/pkiuser/certs
docker exec -u pkiuser pki mkdir /home/pkiuser/conf
docker exec -u pkiuser pki mkdir /home/pkiuser/logs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ca-container-user-service-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
# use fuse-overlayfs
# https://github.com/containers/podman/issues/8705#issuecomment-744357805
docker exec pki ls -lR /home
docker exec -u pkiuser pki mkdir -p /home/pkiuser/.config/containers
docker exec -i -u pkiuser pki tee /home/pkiuser/.config/containers/storage.conf << EOF
[storage]
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ RUN dnf install -y /tmp/RPMS/* \
&& rm -rf /var/cache/dnf \
&& rm -rf /tmp/RPMS

# Update home directory owner
RUN chown -R pkiuser.pkiuser /home/pkiuser

################################################################################
FROM pki-runner AS pki-server

Expand Down

0 comments on commit fcddb3f

Please sign in to comment.