gudata opened a new issue #15161: URL: https://github.com/apache/airflow/issues/15161
**Apache Airflow version**: 2.0.1 **Environment**: - **Cloud provider or hardware configuration**: ec2 - **OS** (e.g. from /etc/os-release): amazon linux 2 - **Kernel** (e.g. `uname -a`): Linux ip-10-1-20-149.rifiniti.local 4.14.225-168.357.amzn2.x86_64 #1 SMP Mon Mar 15 18:00:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - **Install tools**: - **Others**: **What happened**: I created .env and add the ids of my system local airflow user ``` AIRFLOW_UID=1001 AIRFLOW_GID=1003 ``` then I used the image from [docker-compose.yml](https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml) which I found [here](https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html) I ran ``` docker-compose run airflow-worker airflow info ``` and it failed with ``` Creating airflow_airflow-worker_run ... done BACKEND=postgres+psycopg2 DB_HOST=postgres.*****.com DB_PORT=5432 Traceback (most recent call last): File "/home/airflow/.local/bin/airflow", line 5, in <module> from airflow.__main__ import main ModuleNotFoundError: No module named 'airflow' ERROR: 1 ``` **What you expected to happen**: I expect the container to run fine. Here I see a mix of permissions, it looks that the default userid was used ``` (base) [root@ip-10-1-xx-xxx airflow]# docker-compose run airflow-worker bash Creating airflow_airflow-worker_run ... done BACKEND=postgres+psycopg2 DB_HOST=postgres.****.com DB_PORT=5432 I have no name!@84577b619af5:/opt/airflow$ id uid=1001 gid=1003 groups=1003 I have no name!@84577b619af5:/opt/airflow$ grep airflow /etc/passwd airflow:x:50000:50000:,,,:/home/airflow:/bin/bash I have no name!@84577b619af5:/opt/airflow$ ls -la . total 4 drwxrwxr-x 1 airflow root 60 Apr 2 16:30 . drwxr-xr-x 1 root root 21 Feb 14 23:31 .. drwxrwxr-x 3 1001 1003 108 Mar 31 09:52 config drwxr-xr-x 2 1001 1003 6 Apr 2 16:08 dags drwxr-xr-x 2 1001 1003 6 Apr 2 16:08 logs drwxr-xr-x 2 1001 1003 6 Apr 2 16:08 plugins I have no name!@84577b619af5:/opt/airflow$ ls -la /home/airflow/ total 12 drwxr-xr-x 1 airflow root 20 Feb 14 23:31 . drwxr-xr-x 1 root root 21 Feb 14 23:31 .. -rw-r--r-- 1 airflow root 220 Feb 14 23:31 .bash_logout -rw-r--r-- 1 airflow root 3526 Feb 14 23:31 .bashrc drwxr-xr-x 5 airflow root 43 Feb 14 23:31 .local -rw-r--r-- 1 airflow root 807 Feb 14 23:31 .profile ``` I think that this 50000 is already backed in the docker images and can't be changed in runtime, am I right? If I want to go with custom airflowid I should go with building images, right? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
