Since containers managed by docker runs as root, files created in bind mounted volumes will be owned by root:root. This is a problem for files generated during test execution, as the calling user does not have permission to remove them. Therefore, add a wrapper entrypoint that hooks up an exit handler that will fixup the permissions before exiting the container.
Checklist for Updating Infamy Docker Image
This directory holds the Dockerfile and any extras needed to build and update the infix-test container image used for the test system.
The following is a checklist/reminder to maintainers for how to update the image, e.g., with missing Alpine packages.
-
Update the Dockerfile
cd test/docker/ edit Dockerfile -
Build the new image version, for latest version, see released images here: https://github.com/kernelkit/infix/pkgs/container/infix-test in this example we use version 0.4:
docker build -t ghcr.io/kernelkit/infix-test:0.4 . -
Update the
test/.envfile to use the new version -
Verify your new image works properly (remember to remove your
~/.infix-test-venv) -
Send PR to co-maintainer for review
The co-maintainer should then verify themselves before approving the PR. A crucial step to remember is to:
-
Push the new image version to https://ghcr.io. For details on how to do this, see this excellent guide to the GitHub Container Registry:
-
Shorthand after setup (above):
echo $CR_PAT | docker login ghcr.io -u troglobit --password-stdin docker push ghcr.io/kernelkit/infix-test:0.4 -
Merge the PR to the
mainbranch.
Note: the co-maintainer may delegate the chore of uploading the new image to the one who prepared the PR (you), provided of course they have the access rights to do so.