Visitar URL original
Remove AIRFLOW_GID from Docker images by potiuk · Pull Request #18747 · apache/airflow · GitHub
Skip to content

Remove AIRFLOW_GID from Docker images - #18747

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:get-rid-of-airflow-gid
Oct 5, 2021
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:get-rid-of-airflow-gid

Conversation

@potiuk

@potiuk potiuk commented Oct 5, 2021

Copy link
Copy Markdown
Member

The AIRFLOW_GID parameter was in the images for historical reasons,
however for a long time we recommend everyone to use GID=0 in order
to make it possible to run the image with Arbitrary UID. Setting
different group than 0 has NO VALUE actually. You can still
override the group of user when starting the container, so the only
real difference is that the "airflow" unmodifiable files such as
python code belong to different group, which has no real value.
You can still use whatever group you want for mounted files and
modifiable resources. Airflow Docker image will work perfectly fine
when the main group of the user is 0 (and we also have to remember
that if the user belongs to other groups in the host, it will also
belong to those group inside the container, AIRFLOW_GID has only
influence on primary group of that user IN-CONTAINER (not outside
of it).

Removing AIRFLOW_GID seems like best choice for Airflow 2.2.

Fixes: #18709


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk
potiuk requested review from ashb and kaxil as code owners October 5, 2021 14:18
@boring-cyborg boring-cyborg Bot added area:production-image Production image improvements and fixes kind:documentation labels Oct 5, 2021
Comment thread docs/apache-airflow/start/docker.rst Resolved
Comment thread docs/apache-airflow/start/docker.rst Resolved
Comment thread docs/docker-stack/build-arg-ref.rst Resolved
Comment thread docs/docker-stack/entrypoint.rst Resolved
@github-actions github-actions Bot added the full tests needed We need to run full set of tests for this PR to merge label Oct 5, 2021
@github-actions

github-actions Bot commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

Comment thread Dockerfile Resolved
The AIRFLOW_GID parameter was in the images for historical reasons,
however for a long time we recommend everyone to use GID=0 in order
to make it possible to run the image with Arbitrary UID. Setting
different group than 0 has NO VALUE actually. You can still
override the group of user when starting the container, so the only
real difference is that the "airflow" unmodifiable files such as
python code belong to different group, which has no real value.
You can still use whatever group you want for mounted files and
modifiable resources. Airflow Docker image will work perfectly fine
when the main group of the user is 0 (and we also have to remember
that if the user belongs to other groups in the host, it will also
belong to those group inside the container, AIRFLOW_GID has only
influence on primary group of that user IN-CONTAINER (not outside
of it).

Removing AIRFLOW_GID seems like best choice for Airflow 2.2.

Fixes: apache#18709
@potiuk
potiuk force-pushed the get-rid-of-airflow-gid branch from 4be5bea to c9b561a Compare October 5, 2021 17:18
@potiuk
potiuk merged commit 958860f into apache:main Oct 5, 2021
@potiuk
potiuk deleted the get-rid-of-airflow-gid branch October 5, 2021 20:44
@potiuk potiuk added this to the Airflow 2.2.4 milestone Jan 20, 2022
@potiuk
potiuk restored the get-rid-of-airflow-gid branch April 26, 2022 20:47
@potiuk
potiuk deleted the get-rid-of-airflow-gid branch July 29, 2022 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:production-image Production image improvements and fixes full tests needed We need to run full set of tests for this PR to merge kind:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default Value for AIRFLOW_GID. 0 vs. 50000

3 participants