hussein-awala commented on issue #30077:
URL: https://github.com/apache/airflow/issues/30077#issuecomment-1466991250
The Airflow image is the same for webserver, sheduler, workers and
triggerers. It has an entrypoint which call the command `airflow` from Airflow
cli, but you need to provide a sub command to run the service which you need:
```terminal
$ docker run apache/airflow:2.2.3-python3.9
usage: airflow [-h] GROUP_OR_COMMAND ...
positional arguments:
GROUP_OR_COMMAND
Groups:
celery Celery components
config View configuration
connections Manage connections
dags Manage DAGs
db Database operations
jobs Manage jobs
kubernetes Tools to help run the KubernetesExecutor
pools Manage pools
providers Display providers
roles Manage roles
tasks Manage tasks
users Manage users
variables Manage variables
Commands:
cheat-sheet Display cheat sheet
info Show information about current Airflow and environment
kerberos Start a kerberos ticket renewer
plugins Dump information about loaded plugins
rotate-fernet-key
Rotate encrypted connection credentials and variables
scheduler Start a scheduler instance
standalone Run an all-in-one copy of Airflow
sync-perm Update permissions for existing roles and optionally
DAGs
triggerer Start a triggerer instance
version Show the version
webserver Start a Airflow webserver instance
optional arguments:
-h, --help show this help message and exit
airflow command error: the following arguments are required:
GROUP_OR_COMMAND, see help above.
$ docker run apache/airflow:2.2.3-python3.9 webserver
/home/airflow/.local/lib/python3.9/site-packages/azure/storage/common/_connection.py:82
SyntaxWarning: "is" with a literal. Did you mean "=="?
[2023-03-13 21:28:25,654] {cli_action_loggers.py:105} WARNING - Failed to
log action with (sqlite3.OperationalError) no such table: log
[SQL: INSERT INTO log (dttm, dag_id, task_id, event, execution_date, owner,
extra) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('2023-03-13 21:28:25.651328', None, None, 'cli_webserver',
None, 'airflow', '{"host_name": "474b50a2dcef", "full_command":
"[\'/home/airflow/.local/bin/airflow\', \'webserver\']"}')]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
[2023-03-13 21:28:25,679] {dagbag.py:500} INFO - Filling up the DagBag from
/dev/null
[2023-03-13 21:28:25,721] {manager.py:105} INFO - Security DB not found
Creating all Models from Base
[2023-03-13 21:28:25,851] {manager.py:107} INFO - Security DB Created
[2023-03-13 21:28:25,866] {manager.py:245} INFO - Inserted Role: Admin
[2023-03-13 21:28:25,879] {manager.py:245} INFO - Inserted Role: Public
```
You can add the sub command via the field `args`:
```yaml
...
containers:
- name: airflow-webserver
image:
image-registry.openshift-image-registry.svc:5000/CUSTOM_NAMESPACE/airflow
args: ["webserver"]
...
```
--
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]