Apache Airflow dags w/ backend configuration bundle.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

46 lines
1.4 KiB

FROM apache/airflow:2.0.2-python3.8
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
pylint \
libpq-dev \
python-dev \
# gcc \
&& apt-get remove python-cffi \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN /usr/local/bin/python -m pip install --upgrade pip
# COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
RUN curl -sSL https://get.docker.com/ | sh
# COPY requirements.txt ./
# RUN pip install --no-cache-dir -r requirements.txt
# ENV PYTHONPATH "${PYTHONPATH}:/your/custom/path"
ENV AIRFLOW_UID=1000
ENV AIRFLOW_GID=1000
RUN echo airflow ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/airflow
RUN chmod 0440 /etc/sudoers.d/airflow
RUN echo 'airflow:airflow' | chpasswd
RUN groupmod --gid ${AIRFLOW_GID} airflow
RUN groupmod --gid 998 docker
# adduser --quiet "airflow" --uid "${AIRFLOW_UID}" \
# --gid "${AIRFLOW_GID}" \
# --home "${AIRFLOW_USER_HOME_DIR}"
RUN usermod --gid "${AIRFLOW_GID}" --uid "${AIRFLOW_UID}" airflow
RUN usermod -aG docker airflow
RUN chown -R ${AIRFLOW_UID}:${AIRFLOW_GID} /home/airflow
RUN chown -R ${AIRFLOW_UID}:${AIRFLOW_GID} /opt/airflow
WORKDIR /opt/airflow
# RUN usermod -g ${AIRFLOW_GID} airflow -G airflow
USER ${AIRFLOW_UID}
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt