Skip to content

Conversation

connorjward
Copy link
Contributor

@connorjward connorjward commented Sep 5, 2025

This should fix the permissions issues that we saw building Docker images on CI.

The issue was that the regular CI runs are run in a Docker container as the root user and this means that if a job is cancelled then a bunch of files are left behind that are owned by root. If we subsequently build a Docker image on the same runner we would crash because that workflow is run as an unprivileged user.

I tried to make the regular CI runs use an unprivileged user but I don't think that it is possible. Instead the solution I've found here is to build the Docker images inside another container, and hence as root.

@connorjward connorjward marked this pull request as draft September 5, 2025 11:06
@connorjward
Copy link
Contributor Author

@JHopeCollins don't bother reviewing. Needs more thought.

Comment on lines +16 to +25

# UNDO ME
docker:
name: Build developer Docker containers
uses: ./.github/workflows/docker.yml
with:
tag: connorjwardtest-dev-${{ github.base_ref }}
branch: ${{ github.base_ref }}
build_dev: true
secrets: inherit
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
# UNDO ME
docker:
name: Build developer Docker containers
uses: ./.github/workflows/docker.yml
with:
tag: connorjwardtest-dev-${{ github.base_ref }}
branch: ${{ github.base_ref }}
build_dev: true
secrets: inherit

@connorjward connorjward marked this pull request as ready for review September 5, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant