givemechocopy opened a new issue, #52959:
URL: https://github.com/apache/airflow/issues/52959

   ### Apache Airflow version
   
   3.0.2
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   This issue was encountered while running `docker-compose up airflow-init` on 
an AWS EC2 instance using **Ubuntu 24.04** with **Docker Compose v1.29.2**.
   
   
   Starting from Airflow 3.0.x(3.0.0, 3.0.1, 3.0.2), the official 
`docker-compose.yaml` includes a command line using `$(id -u)` to export 
`AIRFLOW_UID`. However, `docker-compose` interprets `$(...)` as a variable 
interpolation expression, which leads to the following error:
   
   ```bash
   ERROR: Invalid interpolation format for "command" option in service 
"airflow-init: ..."
   ```
   
   <img width="940" height="400" alt="Image" 
src="https://github.com/user-attachments/assets/13878911-5cfa-47b6-ae1d-14b763cae6c1";
 />
   
   
   
   This breaks the execution of `docker-compose up airflow-init`, especially 
when using Docker Compose v2+.
   
   
   ### What you think should happen instead?
   
   The command line should be updated to escape the dollar sign, like this:
   
   ```sh
   export AIRFLOW_UID=$$(id -u)
   ```
   
   This ensures the expression is evaluated in the container shell instead of 
being interpreted by Docker Compose.
   
   Alternatively, the documentation can recommend using an .env file to 
predefine AIRFLOW_UID.
   
   ### How to reproduce
   
   1. Download the official docker-compose file:
   ```bash
   curl -LfO 
'https://airflow.apache.org/docs/apache-airflow/3.0.2/docker-compose.yaml'
   ```
   
   2. Run the initialization command:
   ```bash
   docker-compose up airflow-init
   ```
   
   3. Observe the interpolation format error in the terminal.
   
   ### Operating System
   
   Ubuntu 24.04.2 LTS (AWS EC2)
   
   ### Versions of Apache Airflow Providers
   
   apache/airflow:3.0.2
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   docker-compose
   
   ### 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]

Reply via email to