Unable to start airflow webserver in the background in docker container.
See original GitHub issueApache Airflow version: 2.1.2
Environment: continuumio/anaconda3 docker image
- OS (e.g. from /etc/os-release): Debian 10 Buster
- Kernel:
Linux 242e786962c8 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 GNU/Linux
- Install tools: Docker
- Others: Host OS is windows 10
What happened:
I have installed airflow inside the docker container. And to run the webserver, I used the command
airflow webserver -D
to run in the background, however, the application is still running in the foreground and I have to open another terminal to run the airflow scheduler. The same issue is faced when trying to run the airflow scheduler in the background.
What you expected to happen: To start the airflow web server in the background.
How to reproduce it:
- Use the Dockerfile attached to run the image.
- Start a terminal in the container.
- Run
airflow webserver -D
The Dockerfile:
FROM continuumio/anaconda3
WORKDIR /airflow
ENV AIRFLOW_HOME /airflow
ENV AIRFLOW_VERSION 2.1.2
ENV PYTHON_VERSION 3.8
ENV CONSTRAINT_URL "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
RUN apt-get update -y
RUN apt-get install -y --no-install-recommends \
freetds-bin \
ldap-utils \
libffi-dev \
libsasl2-2 \
libsasl2-modules \
libssl1.1 \
locales \
lsb-release \
sasl2-bin \
sqlite3 \
unixodbc
RUN pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
RUN airflow db init
RUN airflow users create \
--username admin \
--firstname admin \
--lastname admin \
--password admin \
--role Admin \
--email admin@admin.org
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Not able to start airflow webserver in background in docker
I am trying to run airflow on an anaconda3 docker image. Everything is working fine, except I am not able to run airflow...
Read more >Airflow Docker - Webserver not starting · Issue #15927 - GitHub
I'm running Airflow via Docker using the official docker-compose image, and whilst everything seems to work fine, the webserver gets stuck ...
Read more >Setting up Apache Airflow 2 with Docker - Towards Data Science
Open your browser and go to 192.168.1.200:8080 . Enter your admin credential and Voilà! What's next? Now you are able to upload your...
Read more >Running Airflow in Docker
airflow -webserver - The webserver is available at http://localhost:8080 . airflow-worker - The worker that executes the tasks given by the scheduler. airflow- ......
Read more >How To Run Airflow on Windows (with Docker)
First of all, we create three services: a metadb, a scheduler and a webserver. Architecturally, Airflow stores its state in a database (the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All works perfectly for me