apache / apache/airflow

Airflow on Podman Not Supporting Other Users

Open
#62,300 3 comments 0 reactions 0 assignees View on GitHub
area:core area:production-image kind:bug needs-triage
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

### Apache Airflow version

3.1.7

### If "Other Airflow 3 version" selected, which one?

_No response_

### What happened?

I'm trying to run airflow in a rootless podman installation. I'm finding lot's of trouble with the permissions and have stripped back to what I believe the most basic test of the image.

I'm executing the command:
`podman run --user=$(id -u):0 docker.io/apache/airflow:3.1.7 airflow version`

This pulls the image just fine, but the /entrypoint script does not seem to be setting the python environment correctly for the specified user
```
....................
ERROR! Maximum number of retries (20) reached.

Last check result:
$ airflow db check
Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 3, in
from airflow.__main__ import main
ModuleNotFoundError: No module named 'airflow'
```

I've ran this test on two machines currently, both running Ubuntu server, one of which being a fresh install with the only prior commands being to upgrade apt and install podman.

This occurs on the container `airflow:3.1.0` as well but not `airflow:3.0.6` or `airflow:2.11.1`

### What you think should happen instead?

This should start the airflow container and report the airflow version in addition to all other items handled in the /entrypoint script.

### How to reproduce

1. Install podman
2. Run basic airflow command with `podman run --user=$(id -u):0 docker.io/apache/airflow:3.1.7 airflow version`
3. Receive python module errors

### Operating System

Ubuntu 24.04.4 LTS

### Versions of Apache Airflow Providers

_No response_

### Deployment

Other Docker-based deployment

### Deployment details

Only tested with podman version 4.9.3

### Anything else?

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.