Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 2.89 KB

0015-handling-rootless-docker.md

File metadata and controls

67 lines (49 loc) · 2.89 KB

Table of Contents generated with DocToc

15. Handling rootless docker

Date: 2023-11-29

Status

Accepted

Builds on 6. Using root user and fixing ownership for-ci-container Builds on 14. Fix root ownership after exiting docker command

Context

Rootless docker solutions are becoming more and more popular. They are more secure to run and they allow to run docker containers without root privileges. It is expected that in the near future, rootless docker will become the default way of running docker.

In case of rootless docker, the assumptions from both 6. and 14. ADRs are not valid. The user running docker is re-mapped from the original user in the host that run the container. This means that the ownership of files created in the container does not have to be fixed (the user ids will be re-mapped from the container back to the host automatically) and that the dag folder owned by the user on the host will be automatically owned by the mapped user inside the container.

This means that we do not need to neither fix the ownership nor change the ownership when the docker is in rootless mode.

Decision

When we enter breeze container we check if docker is running in rootless mode, and we have a DOCKER_IS_ROOTLESS variable set to true when entering the container. This variable might then be used to make decision on changing ownership of the files inside the container.

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.