sophosjane opened a new issue, #53316: URL: https://github.com/apache/airflow/issues/53316
### Apache Airflow version 3.0.2 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? strictly followed the instructions in https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html the host: aws ec2 + Ubuntu 24.04.2 LTS mkdir -p ./dags ./logs ./plugins ./config ----- executed successfully echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env ---- successfully. I checked that the .env has AIRFLOW_UID=1000 AIRFLOW_GID=0 **docker compose up airflow-init ----- executed with the following information** Using the in-memory storage for tracking rate limits as no storage was explicitly specified. This is not recommended for production use. See: https://flask-limiter.readthedocs.io#configuring-a-storage-backend for documentation about configuring the storage backend. airflow-init-1 | airflow-init-1 | Files in shared volumes: airflow-init-1 | airflow-init-1 | /opt/airflow/config: airflow-init-1 | total 116 airflow-init-1 | drwxrwxr-x 2 1000 1000 6144 Jul 13 10:05 . airflow-init-1 | drwxrwxr-x 1 airflow root 4096 Jul 13 10:05 .. airflow-init-1 | -rw------- 1 root root 109497 Jul 13 10:05 airflow.cfg airflow-init-1 | airflow-init-1 | /opt/airflow/dags: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 1000 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 airflow root 4096 Jul 13 10:05 .. airflow-init-1 | airflow-init-1 | /opt/airflow/logs: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 1000 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 airflow root 4096 Jul 13 10:05 .. airflow-init-1 | airflow-init-1 | /opt/airflow/plugins: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 1000 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 airflow root 4096 Jul 13 10:05 .. airflow-init-1 | airflow-init-1 | Change ownership of files in /opt/airflow to 1000:0 airflow-init-1 | airflow-init-1 | airflow-init-1 | Change ownership of files in shared volumes to 1000:0 airflow-init-1 | airflow-init-1 | ownership of '/opt/airflow/logs' retained as 1000:root airflow-init-1 | ownership of '/opt/airflow/dags' retained as 1000:root airflow-init-1 | ownership of '/opt/airflow/plugins' retained as 1000:root airflow-init-1 | ownership of '/opt/airflow/config/airflow.cfg' retained as 1000:root airflow-init-1 | ownership of '/opt/airflow/config' retained as 1000:root airflow-init-1 | airflow-init-1 | Files in shared volumes: airflow-init-1 | airflow-init-1 | /opt/airflow/config: airflow-init-1 | total 116 airflow-init-1 | drwxrwxr-x 2 1000 root 6144 Jul 13 10:05 . airflow-init-1 | drwxrwxr-x 1 1000 root 4096 Jul 13 10:05 .. airflow-init-1 | -rw------- 1 1000 root 109497 Jul 13 10:05 airflow.cfg airflow-init-1 | airflow-init-1 | /opt/airflow/dags: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 root 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 1000 root 4096 Jul 13 10:05 .. airflow-init-1 | airflow-init-1 | /opt/airflow/logs: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 root 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 1000 root 4096 Jul 13 10:05 .. airflow-init-1 | airflow-init-1 | /opt/airflow/plugins: airflow-init-1 | total 8 airflow-init-1 | drwxrwxr-x 2 1000 root 6144 Jul 13 10:04 . airflow-init-1 | drwxrwxr-x 1 1000 root 4096 Jul 13 10:05 .. airflow-init-1 exited with code 0 **docker-compose up -d ----- executed with the following error** `ERROR: Invalid interpolation format for "command" option in service "airflow-init": "if [[ -z "${AIRFLOW_UID}" ]]; thenatch echo echo -e "\033[1;33mWARNING!!!: AIRFLOW_UID not set!\e[0m" echo "If you are on Linux, you SHOULD follow the instructions below to set " echo "AIRFLOW_UID environment variable, otherwise files will be owned by root." echo "For other operating systems you can get rid of the warning with manually created .env file:" echo " See: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#setting-the-right-airflow-user" echo export AIRFLOW_UID=$(id -u) fi one_meg=1048576 mem_available=$$(($$(getconf _PHYS_PAGES) * $$(getconf PAGE_SIZE) / one_meg)) cpus_available=$$(grep -cE 'cpu[0-9]+' /proc/stat) disk_available=$$(df / | tail -1 | awk '{print $$4}') warning_resources="false" if (( mem_available < 4000 )) ; then echo echo -e "\033[1;33mWARNING!!!: Not enough memory available for Docker.\e[0m" echo "At least 4GB of memory required. You have $$(numfmt --to iec $$((mem_available * one_meg)))" echo warning_resources="true" fi if (( cpus_available < 2 )); then echo echo -e "\033[1;33mWARNING!!!: Not enough CPUS available for Docker.\e[0m" echo "At least 2 CPUs recommended. You have $${cpus_available}" echo warning_resources="true" fi if (( disk_available < one_meg * 10 )); then echo echo -e "\033[1;33mWARNING!!!: Not enough Disk space available for Docker.\e[0m" echo "At least 10 GBs recommended. You have $$(numfmt --to iec $$((disk_available * 1024 )))" echo warning_resources="true" fi if [[ $${warning_resources} == "true" ]]; then echo echo -e "\033[1;33mWARNING!!!: You have not enough resources to run Airflow (see above)!\e[0m" echo "Please follow the instructions to increase amount of resources available:" echo " https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#before-you-begin" echo fi echo echo "Creating missing opt dirs if missing:" echo mkdir -v -p /opt/airflow/{logs,dags,plugins,config} echo echo "Airflow version:" /entrypoint airflow version echo echo "Files in shared volumes:" echo ls -la /opt/airflow/{logs,dags,plugins,config} echo echo "Running airflow config list to create default config file if missing." echo /entrypoint airflow config list >/dev/null echo echo "Files in shared volumes:" echo ls -la /opt/airflow/{logs,dags,plugins,config} echo echo "Change ownership of files in /opt/airflow to ${AIRFLOW_UID}:0" echo chown -R "${AIRFLOW_UID}:0" /opt/airflow/ echo echo "Change ownership of files in shared volumes to ${AIRFLOW_UID}:0" echo chown -v -R "${AIRFLOW_UID}:0" /opt/airflow/{logs,dags,plugins,config} echo echo "Files in shared volumes:" echo ls -la /opt/airflow/{logs,dags,plugins,config} Thanks for your time and help. ### What you think should happen instead? _No response_ ### How to reproduce the host: aws ec2 + Ubuntu 24.04.2 LTS strictly followed the instructions in https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html - curl -LfO 'https://airflow.apache.org/docs/apache-airflow/3.0.2/docker-compose.yaml' - sudo chmod +x /usr/bin/docker-compose - mkdir -p ./dags ./logs ./plugins ./config - echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env - docker compose up airflow-init - docker-compose up -d ### Operating System Ubuntu 24.04.2 LTS ### Versions of Apache Airflow Providers apache/airflow:3.0.2 ### Deployment Docker-Compose ### Deployment details _No response_ ### 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) -- 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]
