Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.48 KB

0014-fix-root-ownership-after-exiting-docker-command.md

File metadata and controls

60 lines (44 loc) · 2.48 KB

Table of Contents generated with DocToc

14. Fix root ownership after exiting docker command

Date: 2023-11-20

Status

Accepted

Builds on 6. Using root user and fixing ownership for-ci-container

Context

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.

Decision

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.

Consequences

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.