You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/10 08:03:47 UTC
[GitHub] [airflow] KimchaC commented on issue #8605: Add Production-ready docker compose for the production image
KimchaC commented on issue #8605:
URL: https://github.com/apache/airflow/issues/8605#issuecomment-690065621
Instead of modifying the existing image, you can also build from the finished image and add your own stuff.
Here's my image for example:
```
FROM apache/airflow:1.10.12
USER root
# This fixes permission issues on linux.
# The airflow user should have the same UID as the user running docker on the host system.
# make build is adjust this value automatically
ARG DOCKER_UID
RUN \
: "${DOCKER_UID:?Build argument DOCKER_UID needs to be set and non-empty. Use 'make build' to set it automatically.}" \
&& usermod -u ${DOCKER_UID} airflow \
&& groupmod -g ${DOCKER_UID} airflow \
&& chown -Rhc --from=50000 ${DOCKER_UID} / || true \
&& chown -Rhc --from=:50000 :${DOCKER_UID} / || true \
&& echo "Set airflow's uid and gid to ${DOCKER_UID}"
# Install cmd utils
RUN apt-get update -yqq \
&& apt-get install -y git \
procps \
vim
# Install MS SQL Support (ODBC Driver)
RUN apt-get update && apt-get install -y gnupg curl && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add --no-tty - && curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list && apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev g++
USER airflow
# Install Apache 2.0 backports for mssql
RUN pip install --user apache-airflow-backport-providers-odbc \
apache-airflow-backport-providers-microsoft-mssql
# Install airflow packages
RUN pip install --user apache-airflow[slack]
# Install plugin dependencies
RUN pip install --user azure-storage-blob \
sshtunnel \
google-api-python-client \
oauth2client \
beautifulsoup4 \
dateparser \
rocketchat_API \
typeform \
&& pip install --user git+https://github.com/infusionsoft/Official-API-Python-Library.git
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org