Table of Contents generated with DocToc
Date: 2023-11-20
Accepted
Builds on 6. Using root user and fixing ownership for-ci-container
As discussed in 6. Using root user and fixing ownership for-ci-container we run Breeze CI container as root user. We used to use TRAP to fix the ownership of files created in the container by root user. However, this is not fool-proof and using TRAP has its caveats (for example it can be overridden by another TRAP command). Also TRAP might be invalidated by signal handling or abrupt killing the docker container. Running the cleanup command after docker command completed seems to do be much more robust solution.
Instead of running the command as TRAP when exiting we simply attempt to clean the ownership whenever
we exit the container using breeze
, breeze shell
, tests
or breeze start-airflow
commands that run
commands in the CI image.
Users running Breeze on Linux will have less problems with root owned files and we can also remove
dedicated ci fix-ownership
command in CI.