RonaldGalea opened a new issue, #35255:
URL: https://github.com/apache/airflow/issues/35255
### Apache Airflow version
2.7.2
### What happened
I tried to use the slim docker image version for running dockerized
airflow, as explained in the
[docs](https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#fetching-docker-compose-yaml).
It works fine with the default tag (`apache/airflow:2.7.2`), but upon
switching to `apache/airflow:slim-2.7.2`, I get the following errors:
```
airflow-dags-airflow-init-1 | Traceback (most recent call last):
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/bin/airflow", line 5, in <module>
airflow-dags-airflow-init-1 | from airflow.__main__ import main
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/airflow/__init__.py", line
68, in <module>
airflow-dags-airflow-init-1 | settings.initialize()
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/airflow/settings.py", line
524, in initialize
airflow-dags-airflow-init-1 | configure_orm()
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/airflow/settings.py", line
220, in configure_orm
airflow-dags-airflow-init-1 | engine =
create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args,
future=True)
airflow-dags-airflow-init-1 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow-dags-airflow-init-1 | File "<string>", line 2, in
create_engine
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/sqlalchemy/util/deprecations.py",
line 375, in warned
airflow-dags-airflow-init-1 | return fn(*args, **kwargs)
airflow-dags-airflow-init-1 | ^^^^^^^^^^^^^^^^^^^
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/sqlalchemy/engine/create.py",
line 544, in create_engine
airflow-dags-airflow-init-1 | dbapi =
dialect_cls.dbapi(**dbapi_args)
airflow-dags-airflow-init-1 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
airflow-dags-airflow-init-1 | File
"/home/airflow/.local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py",
line 811, in dbapi
airflow-dags-airflow-init-1 | import psycopg2
airflow-dags-airflow-init-1 | ModuleNotFoundError: No module named
'psycopg2'
airflow-dags-airflow-init-1 |
airflow-dags-airflow-init-1 | ERROR!!!: Too old Airflow version !
airflow-dags-airflow-init-1 | The minimum Airflow version supported:
2.2.0. Only use this or higher!
airflow-dags-airflow-init-1 |
airflow-dags-airflow-init-1 exited with code 1
```
### What you think should happen instead
Using the slim image should work. It seems there's a missing dependency,
however.
### How to reproduce
Take the unmodified docker compose file from the docs and change the
[tag](https://airflow.apache.org/docs/apache-airflow/2.7.2/docker-compose.yaml)
to use the slim image.
### Operating System
22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023;
root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [X] 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)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]